Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Backing up SEQUENCEs
there is no way to export only specific objects other than tables.but
you can generate script and run in other schema/database. use
following script:
set heading off set feedback off select 'create sequence
'||sequence_name||' increment by '
||INCREMENT_BY||' start with '||to_char(last_number+1)||' '||chr(10)||
decode(max_value,null,' NOMAXVALUE ',' maxvalue '||max_value)||
decode(cycle_flag,'Y','CYCLE',' NOCYCLE ')|| ' cache '||cache_size||' ;
' from user_sequences
spool seq.sql / spool off set feedback on set heading on
copy above script and paste it in a file and run. it gives you sequence creation script( seq.sql). run seq.sql in other DB/schema.
Best Regards.
-- Posted via dBforums http://dbforums.comReceived on Tue Apr 16 2002 - 22:41:41 CDT