Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get a DDL statement for all Sequences in a user

user546710Mar 11 2008 — edited Mar 11 2008
Hi all...
How to get a DDL statement for all Sequences in a user. I tried following spool
script. It is giving ORA-31603:

***********************************************************************************
set pagesize 0
set long 90000
set feedback off
set echo off
spool c:\create_index.sql
SELECT DBMS_METADATA.GET_DDL('INDEX',a.OBJECT_NAME) from user_objects a where a.OBJECT_TYPE ='SEQUENCE' order by a.OBJECT_NAME;
spool off;
exit

***************************************************************************************
Thanks in advance,
Pal
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2008
Added on Mar 11 2008
3 comments
10,628 views