How to export sequences using sql
Normally sequences are not exported if we give partial export.
For such cases we can use sql to generate quries for sequence droping and creating
select ‘drop sequence ‘||sequence_name||’;’ from user_sequences where sequence_name like’SEQ_DB%’;
select ‘create sequence ‘||sequence_name||
‘ minvalue ‘|| MIN_VALUE ||
‘ maxvalue ‘|| MAX_VALUE ||
‘ start with ‘||last_number||
‘ increment by ‘|| INCREMENT_BY ||
‘ cache ‘||CACHE_SIZE ||
decode(ORDER_FLAG,’Y',’ order ‘)||
decode(CYCLE_FLAG,’Y',’ cycle ‘)||
‘;’
KeHoeff 5:01 pm on May 28, 2009 Permalink
hey this is a very interesting article!
GarykPatton 7:54 pm on June 15, 2009 Permalink
How soon will you update your blog? I’m interested in reading some more information on this issue.