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

From: Mark W. Farnham <mwf_at_rsiz.com>
Date: Mon, 26 Jul 2021 23:26:45 -0400
Message-ID: <08f101d78297$3a4482c0$aecd8840$_at_rsiz.com>


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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mladen Gogala Sent: Monday, July 26, 2021 7:40 PM
To: oracle-l_at_freelists.org
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

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





--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jul 27 2021 - 05:26:45 CEST

Original text of this message