Schema compare: combine Source and target in sync. script

Hi community! Just purchased Toad subscription in order to compare/synchronize two DB schemas.

I have following scenario:

Table = T1
In my Source schema, T1 has three fields, C1, C2 and C3. C1 is a varchar2 (20 char).
In my Target schema, T1 has only fields C1 and C2. C1 here is varchar2 (50 char).

Can anyone help me understand how to get a sync. script that adds C3 to T1 in the target, while keeping C1's size to varchar2 (50 char)?

Thanks!

Hi Marcelo,

When the schema compare completes, you have an opportunity to uncheck any differences found to keep them out of the sync script

For example, unchecking DeptNo here would do that.

-John

Thanks John!
yes, you are right. But my problem is that in order to add C3 -and I might be misunderstanding this- the script includes a create table statement (via a temp table) with the settings from Source. Then it doesn't have any effect to deselect C1 from the differences, since the whole table structure is copied from Source. Or does it?

HI Marcelo,

I don't remember offhand. That may be true if you have the following options checked. But I think you should be able to exclude any difference by unchecking it as shown in my first reply.

Please give it a try and let me know what happens. If a diff is still getting synced despite being unchecked, that would be a bug and I'll fix it.

-John

Hi again,
I have an example here, after trying your suggestion:

(screen shot of the script in separate post)

I have de-selected two fields, and that works fine. But there is no ADD statement to create the VERSION_FILES field.
Any other setting I should look into?
Thanks!

image

Hm, I wonder if you found a bug. Seems like it should be in there somewhere

Can you post CREATE TABLE scripts for these two tables so I can try it on my own?

-John

My apologies! I realize now that the VERSION_FILES field actually is in both schemas, just in another position. The red color made me believe it was only present in the source. I will try to find a better table to test your first suggestion tomorrow.
Thanks!

Ah, yeah I see it now too. That "Preview" panel is just a dumb text file comparison. It has no knowledge of SQL syntax and things like column order. The code that actually compares your tables and creates a sync script is a lot smarter.