Home » RDBMS Server » Server Administration » how to apped when get ddl (11.2.0.1 windows)
how to apped when get ddl [message #518883] Mon, 08 August 2011 04:29 Go to next message
andy huang
Messages: 498
Registered: July 2011
Senior Member
Dear all
Have got ddl of index,but it is not append ';' end of each index,how to append ';' by auto.

Select 
       Dbms_Metadata.Get_Dependent_Ddl(Object_Type      => 'INDEX',
                                       Base_Object_Name => 'TB_HXL_USER') 
  From Dual


result:

CREATE INDEX "HXL"."IDX_TB_HXL_USER_N1" ON "HXL"."TB_HXL_USER" ("USERNUMBER")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
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 "USERS" -- there is not ';'

CREATE UNIQUE INDEX "HXL"."IDX_TB_HXL_USER_U1" ON "HXL"."TB_HXL_USER" ("STATEDATE", "PROVCODE", "USERNUMBER")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
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 "USERS" -- there is not ';'
Re: how to apped when get ddl [message #518887 is a reply to message #518883] Mon, 08 August 2011 04:44 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Before running your SELECT statement, issue
exec DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE);
which will set terminator.
Re: how to apped when get ddl [message #518892 is a reply to message #518887] Mon, 08 August 2011 04:51 Go to previous message
andy huang
Messages: 498
Registered: July 2011
Senior Member
Thanks!
Previous Topic: can not execute dbms_redefinition.start_redef_table
Next Topic: reduce the system tablespace size
Goto Forum:
  


Current Time: Fri Nov 29 06:53:33 CST 2024