Thursday, 2 November 2023

Get DDL for Index

 



set long 1000000000 
set pagesize 900
SELECT sys.dbms_metadata.get_ddl('<object-type>','<object-name>','<schema>') FROM dual;



SQL> SELECT SYS.DBMS_METADATA.GET_DDL('INDEX','T_DC_SOURCEDATA_USER_1','AVUSER') from dual;
SYS.DBMS_METADATA.GET_DDL('INDEX','T_DC_SOURCEDATA_USER_1','AVUSER')


CREATE INDEX "AVUSER"."T_DC_SOURCEDATA_USER_1" ON "AVUSER"."T_DC_SOURCEDATA_USER" ("RUN_ID", "DC_ID", "USER_ID")  
PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING  
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645  
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1  
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)  
TABLESPACE "INDX_1M"

No comments:

Post a Comment