Import and export tables resets sequences. Why? [message #20862] |
Wed, 26 June 2002 02:41 |
David
Messages: 110 Registered: November 1998
|
Senior Member |
|
|
Hi,
I am exporting a DB and then Importing it into another. As a result the sequences are again set to 1. How can I keep their original value?
The statements I am using are :
exp s/r@slbackup file=a.dmp log=a.log rows=yes indexes=n tables= LB_CD_SHELVES , ....
then I drop all the tables and import
imp s/r@idoc1 file=a.dmp log=a.log rows=yes indexes=n tables=LB_CD_SHELVES, ...
Thanks.
|
|
|
|
Re: Import and export tables resets sequences. Why? [message #20868 is a reply to message #20862] |
Wed, 26 June 2002 12:35 |
Grant
Messages: 578 Registered: January 2002
|
Senior Member |
|
|
The export you are doing does not export sequences. Also, as far as I know Oracle doesn't RESET sequences when you import. If it did you would have constraint violations for all primary keys. Unless I am missing something you should be contacting Oracle Support or you need to provide more info on what you are doing.
As a side note I was curious so I did a FULL, USER, and TABLE export and looked at the export to see what it would do on import. All sequences maintained their current value except on the table export where no sequences were exported even with CONSISTENT=Y.
|
|
|
|
Re: Import and export tables resets sequences. Why? [message #21486 is a reply to message #20868] |
Wed, 07 August 2002 07:04 |
David
Messages: 110 Registered: November 1998
|
Senior Member |
|
|
You are right. It does not export the sequences. I had some left-overs from the schema creation process which messed up my results. Sorry...
THE PROBLEM NOW IS :
How do I export the sequences together with the tables and their data? I want to be able to work on schema1 export it , import it into schema2 and then continue working on schema 2 without loosing the sequneces .
Is it possible ?
Thank you in sdvance
David
|
|
|