|
-
unix script
the script drops whatever you are creating beforehand so you won't attempt to create a sequence that already exists.
it's a unix script, but you can just change some of the parameters that get passed like TARGET (schema you are moving to) and SOURCE (schema you are copying):
spool /tmp/sequences.sql
select 'drop sequence ${TARGET}.'|| sequence_name ||';'||'
create sequence ${TARGET}.'|| sequence_name ||'
increment by 1 start with '|| (last_number + 1) ||
' minvalue '|| last_number ||' order;'
from dba_sequences
where sequence_owner = upper('${SOURCE}');
spool off
- magnus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|