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 ‘)||
‘;’
hey this is a very interesting article!
How soon will you update your blog? I’m interested in reading some more information on this issue.