Options of Sync Schema

Automate and integrate using the SQL comparison API

Moderators: Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

Options of Sync Schema

Postby u504245349 » Mon Nov 25, 2013 10:01 am

I use SQL Comparison SDK 10
I try to sync database's schema [A] to database's schema [B].
Ex.
-- Before Sync
[A] have 1 table 3 columns - [B] have 1 table 4 columns
ItemCode NVarChar(50) | ItemCode NVarChar(50)
Itemname NVarChar(50) | ItemName NVcarChar(30)
UnitPrice Float | ...............
...... | UnitName NVarChar(50)
...... | Remark Text


-- After Sync (Real)
[A] have 1 table 3 columns - [B] have 1 table 3 columns
ItemCode NVarChar(50) | ItemCode NVarChar(50)
Itemname NVarChar(50) | ItemName NVcarChar(50) << edit
UnitPrice Float | UnitPrice Float
...... | ................. << drop
...... | ................. << drop

-- After Sync (My needs)
[A] have 1 table 3 columns - [B] have 1 table 5 columns
ItemCode NVarChar(50) | ItemCode NVarChar(50)
Itemname NVarChar(50) | ItemName NVcarChar(50) << edit
UnitPrice Float | UnitPrice Float
...... | UnitName NVarChar(50) << add new
...... | Remark Text << add new

I need to edit and add new columns on [B] only ,
I don't to drop something from [B].

How do I do ??

Regard,
Sek
u504245349
 
Posts: 3
Joined: Wed Apr 11, 2012 6:21 am

Postby Brian Donahue » Tue Nov 26, 2013 4:23 pm

Hi Sek,

This does not seem to be possible. The SQL Compare user interface lets you map different columns to preserve data, but you can only map one column to another. I thought you could try removing the SqlCompareFieldmappings from the table so the additional columns would be ignored, but the SDK does not even let you access the SqlCompareFieldmappings.

Best I can think of doing is save the script and manually adjust it to remove the column drops. I don't have an example for that, though.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK 10

Who is online

Users browsing this forum: No registered users and 0 guests