Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import issue 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi everybody,

I've exported my DB with FULL option to a file, say exp.dmp. Does anybody know if I can ONLY imp the sequence to another DB? (NOTE : I don't need to import tables, indexes, grants, etc... and the DB corresponding to the exp.dmp has already been destroyed)

many thanks
 

Why dont you just recreate the sequences and start from where your original sequence stopped? It is not possible to import only the sequences.

If you dont have the docs or scripts to recreate these sequences, you can read your export dump file see which one to create.
 

Don't forget to backup your dump file first before you do anything with it. The procedure in reading and updating the export dump file is not recommended by Oracle.
 
thanks rcurva, I'm just investigation my previous DB, which was deleted for about one year. I have absolutely no idea about the DB content. What I have to do is to extract all the sequences for investigation.

I know it's possible not to commit records at table level. Is it possible to JUST read the sequences without creating any object (because I do not have enough disk for loading all objects)
 

Actually, you can load the schema without the data, this way you wont have worry about space. For example;


imp user/pwd@db full=y rows=n file=your_exp.dmp

 
You may create a script to generate statements for sequence creation:

select 'create sequence '||SEQUENCE_OWNER||'.'||SEQUENCE_NAME||
' minvalue '||min_value||
' maxvalue '||max_value||
' increment by '||INCREMENT_BY||
decode(CACHE_SIZE,0,' NOCACHE ',' cache '||CACHE_SIZE||' ')||
decode(cycle_flag,null, ' NOCYCLE ', ' CYCLE ')||
decode(order_flag,null, ' NOORDER ', ' ORDER ')||chr(10)||'/'
from dba_sequences

Spool the result to some file and then execute it on target database.

You may also limit the result set by selecting sequences that belong to appropriate user only.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top