Toad World® Forums

Toad Data Modeller Synchronize-->Generate change script wizard

I have run into yet another issue with this wizard. I have used Toad to create all data models and generated physical tables for these models (dimension tables).

I have generated numerous Dimension tables with the DDL wizard, now when I try to synchronize immediately after creating the tables with said DDL, the synchronize wizard tells me there are differences. This should be impossible, e.g. the two should now be Exactly the same cause I just used TOAD to generate the DDL that created the table and I haven't made any changes. See below:

Two issues:

  1. I have tried to implement an Alternate key with TOAD in a dimension table by specifying a unique attribute in the entity attribute settings for this Company dimension. Firstly the wizard claims the Alternate key is not unique in the database, not sure how this can be, I know for sure TOAD creating a unique constraint on the alternate key I specified so why is there a discrepancy here? It of course creates an alter script to try and fix the problem but it just drops and re-creates the unique constraint and the above display repeats itself again when I use the synchronize wizard?

  2. The second discrepency is the most baffling. I know TOAD created the script

ALTER TABLE [dbo].[DimCompany] ADD CONSTRAINT [AK_DimCompany] UNIQUE ([CompanyAltKey])
go

to implement the alternate key, but the wizard thinks that the AK still does not exist in the database and then for some reason it lists the opposite in red below? They're exactly the same its like the wizard is confirming that its wrong?

How is this possible? I could probably exclude these checks from the compare but I don't want to keep excluding things in the compare list because I may miss things that I validly need the wizard to pick up.

I am a bit concerned about using this synchronization wizard, this type of synchronization process is so straight forward and simple with products like Erwin, am I wrong in assuming that I can use the same sort of tool in TOAD, should I perhaps be generating new DDLs everytime I want to change tables and only use the synchonize wizard just to check if anything has changed (filtering out the mistakes of course) and not rely on any code it generates?

Any advice would be appreciated.

I am using TOAD v 5.2.4.25

thank you.

Hi Dominics,

the difference is based on the value of Unique property of the CompanyAltKey attribute. In the orignal model the value is True, in reversed model the value is False.
We plan to work on significant improvements and e.g. allow users to map objects that were renamed in model or in database and we will also prepare fix for the scenario you described. The objects in both models should be mapped correctly, of course.
New change request was created: TDM-578.

As a workaround, I can only recommend the following: instead of using the Unique checkbox on Attribute Properties form, manually create a new alternate key on tab Keys and add the attribute to the key from there. The key will exist then and value of Unique checkbox will be false in the original model as well as in reversed model.

Thank you for your feedback,

Vaclav

Ok thanks Vaclav