Oracle schema compare with sequences as default value

Hi,

With Oracle 12C we can define a sequence as a default value for a column.

We I compare two schemas, Toad will show a difference for each column using this feature because the owner of the sequence is different for each schema. Is there a way to tell Toad to ignore the schema name of the sequence when comparing default value?

I have attached a axample of the difference.

Thanks

Hmm, I think that was overlooked. I’ll take care of it when we get into betas again.

For now, on the results tab of the schema compare, you can uncheck the items that you don’t want to appear in the sync script.

Looking at this a bit more closely…

if you define your table like this, then you will have some extra benefits:

  1. You don’t have to create your sequence separately, nor worry about it being dropped (Oracle won’t let anyone drop it separately from the table)

  2. Toad won’t identify it as a difference between schemas.

CREATE TABLE IDENT_TEST

(

COL1 NUMBER Generated as Identity,

COL2 VARCHAR2(10),

COL3 DATE

)

Hi John,

We first thought about using this method. The problem with it is that we want to control what the name of the sequence is as we need to reference it later.
When we create it the way you describe, Oracle generates the name of the sequence and it will be more difficult to get the name of it.

Thanks

François Guertin** | **** Technical
Support Administrator, R&D**

Your Supply Chain Matters.™ - TECSYS

Tel.: (514) 866-5800 ext.4259 | Fax:
(514) 866-3878

francois.guertin@tecsys.com | www.tecsys.com

De : John Dorlon [mailto:bounce-jdorlon@toadworld.com]

Envoyé : 4 juin 2015 10:21

À : toadoracle@toadworld.com

Objet : RE: [Toad for Oracle - Discussion Forum] Oracle schema compare with sequences as default value

RE: Oracle schema compare with sequences as default value

Reply by John Dorlon

Looking at this a bit more closely…

if you define your table like this, then you will have some extra benefits:

  1. You don’t have to create your sequence separately, nor worry about it being dropped (Oracle won’t let anyone drop it separately from the table)

  2. Toad won’t identify it as a difference between schemas.

CREATE TABLE IDENT_TEST

(

COL1 NUMBER Generated as Identity,

COL2 VARCHAR2(10),

COL3 DATE

)

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

OK, it should be fixed for the first beta after 12.7 is released. The side-by-side viewer will still identify this as a difference because it is just a dumb text compare, but the schema compare will not flag this as a difference (so the only reason you’d see it in the side-by-side viewer is if there were some other difference on the table)