RE: datapump import schema and default values taken from a sequence

  • From: "Mark W. Farnham" <mwf@xxxxxxxx>
  • To: <gogala.mladen@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jul 2021 23:26:45 -0400

Seems like a Painful Incompleteness Awkwardness (PIA), also known shorter and 
more colorfully.

Still, I wonder if you have a pause on DML whlist you are cloning the schema. 
IF you do, a woeful work-around might be to temporarily shut off the when NULL 
sequence directive on the table(s) in THOMAS, do the clone, turn them back on 
on THOMAS and create the when NULL sequence directive on ARTHUR.

Presumably it is only the when NULL sequence directive that is Fouled Up Beyond 
All Recognition (FUBAR) and the sequence itself is getting correctly created 
with the current next number. Right?

What a PIA!

mwf

PS: Another way would be to create a new pluggable database and carefully 
import THOMAS from the current location into the new pluggable. Some might say 
that is a better testbed, unless of course you are testing the rename schema 
completeness of clone schema!

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On ;
Behalf Of Mladen Gogala
Sent: Monday, July 26, 2021 7:40 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: datapump import schema and default values taken from a sequence

Nope. If REMAP_SCHEMA doesn't work, that's it. You can, however, pre-create the 
with the proper definition and then use TABLE_EXISTS_ACTION=APPEND. That, 
however, could lead to another problem since the newly created sequence will 
start from the beginning, whatever START WITH option of the CREATE SEQUENCE 
command has specified, so the rows from the original table will very likely 
differ from the imported rows. Let me discover the hot water and tell you that 
you're in a pickle. Good luck.

On 7/26/21 6:03 AM, Thomas Kellerer (Redacted sender thomas.kellerer for
DMARC) wrote:

So my question is:

Is there any way to tell DataPump to replace the reference to 
"THOMAS"."MY_TABLE_ID_SEQ" with the target schema:  
"ARTHUR"."MY_TABLE_ID_SEQ"?

--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
//www.freelists.org/webpage/oracle-l





--
//www.freelists.org/webpage/oracle-l


Other related posts: