State of sequence in full db exp/imp [message #122967] |
Thu, 09 June 2005 07:00 |
mrinal.c
Messages: 2 Registered: June 2005
|
Junior Member |
|
|
Hi Gurus,
If I'm importing a full database to an empty databse from a
*.dmp file(which is a full exp of a database),
then whether could I get the same sequences along with their current value
as that of I have in other database.
Example:
Db : A
It has a sequence seq1 with scott.seq1.currentval=15
where my sequence starts from 1 and ends at 40 with increment of 1.
Now I took : exp x/y file=say.dmp full=y
Db : B
imp x/y file=say.dmp constaraints=y indexes=y buffer=36000
Now my question is whether I'll get sequence scott.seq.currval=15 or not
????
Thanks in advance,
Wirh regards,
Mrinal
|
|
|
|
Re: State of sequence in full db exp/imp [message #122998 is a reply to message #122967] |
Thu, 09 June 2005 09:28 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Mahesh, that is a good and useful demo.
OP, the important thing is that Oracle maintains the sequence so that when you start getting values from it again you will not get any duplicate values. That is all a sequence is for: to provide a fast way to get unique values. There is no guarantee that they will always be sequential or won't have gaps. But there is a guarantee that they will be unique, so even when you export and import, as demo'd, you don't have to manually reset each sequence to prevent duplicates.
|
|
|
|
|
|
|