RE: datapump import schema and default values taken from a sequence
Date: Tue, 27 Jul 2021 11:30:32 -0400
Message-ID: <098001d782fc$56f75c20$04e61460$_at_rsiz.com>
Brilliant, presuming you're allowed to change THOMAS. (Of course decommissioning and recommissioning default null on THOMAS is also a change to THOMAS. If we're splitting hairs I would say decommissioning and recommissioning default NULL is not testing a relatively new feature.)
But if you are allowed to make that change upstream of your clone schema testing of change, that would be a forward looking change that SHOULD eliminate the problem.
mwf
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Thomas Kellerer (Redacted sender "thomas.kellerer" for DMARC)
Sent: Tuesday, July 27, 2021 10:01 AM
To: oracle-l_at_freelists.org
Subject: Re: datapump import schema and default values taken from a sequence
Ah, that's a good idea. I can confirm that it works as expected.
Thanks for the suggestion.
Regards
Thomas
Jonathan Lewis schrieb am 27.07.2021 um 15:27:
>
> Since you're on 18c has anyone suggested using an identity column - which does exactly the same sort of "default on null sequence" approach, but does it through a system generated sequence and doesn't reference a sequence name in the dbms_metadata.get_ddl output, so will (presumably) create the correct sequence on the import.
>
> Regards
> Jonathan Lewis
>
>
> On Mon, 26 Jul 2021 at 11:03, Thomas Kellerer <dmarc-noreply_at_freelists.org <mailto:dmarc-noreply_at_freelists.org>> wrote:
>
> Hello,
>
> we are using the DataPump API to clone schemas for testing purposes.
>
> However, DataPump fails to import tables that use "DEFAULT ON NULL" based on a sequence, as it does not remap the owner of the sequence reference in the table's ddl.
>
> 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"?
>
> Or is there any other way to clone a schema so that the above situation would be resolved?
> (In the long run, we might use PDBs instead of schemas, but for now this is not an option).
>
> We are using Oracle 18c.
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Tue Jul 27 2021 - 17:30:32 CEST