Hi Friends,
I'm running Oracle DB 11.2.0.3 on Windows 2008 R2 SP1 Servers and I faced a strange sequences behavior after importing a schema via Data Pump.
The export is done this way:
EXPDP userid/password dumpfile= logfile= directory= remap_dumpfile=y (no news)
The import is done this way
IMPDP userid/password dumpfile= logfile= directory= remap_schema=(old_one:new_one) remap_tablespace=(old_ones:new_ones, so on...)
The import works fine. There are no errors and the sequences are as well imported with no warnings.
The strange behavior is that the sequences seems to "reset". When we call a sequence the NEXTVAL is just lower than the values already stored in the Database, and we get ORA-00001 a lot. The sequence should know that vale. I don't have this problem when using exp/imp, just via DataPump.
So that when we create an order that should receive the value of 100, as an example, because we have 99 orders on the system, Oracle suggest a value lower than 99 or even the number one value (01).
We then wrote a script to check the CURVAL of the sequences on the base schema to recreate the sequences using this initial value on the new imported schema.
Does anyone faced this problem before?
Any suggestions?
Tks a lot