Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Backing up SEQUENCEs

Re: Backing up SEQUENCEs

From: regio <member_at_dbforums.com>
Date: 17 Apr 2002 03:41:41 GMT
Message-ID: <3cbceef5$1@usenetgateway.com>


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.com
Received on Tue Apr 16 2002 - 22:41:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US