Export index-organized table with nested table column

Athlantis

Member²
Hi there. Exporting IO-table with nested table column come out with a little bit wrong script, which one couldn't be executed.

For example, export some table by PLSQLDev gives next:
create table BCZ.TRIGHTS
(
branch NUMBER not null,
userid NUMBER not null,
usertype NUMBER not null,
objectid NUMBER not null,
accesskey TABVARCHAR2,
constraint IRIGHTS primary key (BRANCH, USERID, USERTYPE, OBJECTID)
)
nested table ACCESSKEY store as TACCESSKEY
organization index;

Executing fails with ORA-00922 missing or invalid option;
Exchanging last 2 strings places turns into mazel tov :)

dbms_metadata.get_ddl issues OK script
CREATE TABLE "BCZ"."TRIGHTS"
( "BRANCH" NUMBER NOT NULL ENABLE,
"USERID" NUMBER NOT NULL ENABLE,
"USERTYPE" NUMBER NOT NULL ENABLE,
"OBJECTID" NUMBER NOT NULL ENABLE,
"ACCESSKEY" "BCZ"."TABVARCHAR2" ,
CONSTRAINT "IRIGHTS" PRIMARY KEY ("BRANCH", "USERID", "USERTYPE", "OBJECTID") ENABLE
) ORGANIZATION INDEX NOCOMPRESS PCTFREE 0 INITRANS 2 MAXTRANS 255 LOGGING
STORAGE(INITIAL 393216 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "BCZ"
PCTTHRESHOLD 50
NESTED TABLE "ACCESSKEY" STORE AS "TACCESSKEY"
 
It would be a big pleasure to add checkbox possibility to choose whether to export partitions of a table or not. Because excluding storage option doesnt influent on it. Then an export releases with useless partitions within non-existent tablespaces... :)
 
Eine kleine...

Dev exports a nested table by itself, which not just executable, but futile in principle. Looks like:
prompt
prompt Creating table TACCESSKEY
prompt =========================
prompt
create table TACCESSKEY
cache;

dbms_metadata.get_ddl('TABLE', 'TACCESSKEY') returns
ORA-31603: object "TACCESSKEY" of type TABLE not found in schema "BCZ"

maybe because of user_tables.nested = 'YES'...
 
Back
Top