Synchronization Script
Brian Donahue
Posts: 6,590 Bronze 1
Hi Jane,
After you do the comparison, you can use the session object to get the
migration SQL. That returns an ExecutionBlock that contains the migration
script:
obComparisonSession.CompareDatabases(dbSourceDatabase, dbTargetDatabase,
obTableComparisonSettings);
RedGate.SQL.Shared.ExecutionBlock obExeBlock =
obSqlProvider1.GetMigrationSQL(obComparisonSession, false);
sDataMigrationSQL = obExeBlock.ToString();
Console.WriteLine(sDataMigrationSQL);
Regards,
Brian Donahue
Red Gate Technical Support
"Jane A" <jakberdin@yahoo.com> wrote in message
news:6eTsWXTBEHA.1220@server53...
> Hi,
> I am using SQLDataCompareComandLine Sample that comes with Toolkit to
> compare tables in Northwind and Northwind2(I created this database for
> testing purposes) databases.
> When I am running this project in debug mode with /sync parameter, and
> /out:NorthwindCompare.txt, all tables get synchronized and I get
> NorthwindCompare.txt with all the differences. But where is the update
> script its self?
>
> Thanks,
> Jane
>
>
After you do the comparison, you can use the session object to get the
migration SQL. That returns an ExecutionBlock that contains the migration
script:
obComparisonSession.CompareDatabases(dbSourceDatabase, dbTargetDatabase,
obTableComparisonSettings);
RedGate.SQL.Shared.ExecutionBlock obExeBlock =
obSqlProvider1.GetMigrationSQL(obComparisonSession, false);
sDataMigrationSQL = obExeBlock.ToString();
Console.WriteLine(sDataMigrationSQL);
Regards,
Brian Donahue
Red Gate Technical Support
"Jane A" <jakberdin@yahoo.com> wrote in message
news:6eTsWXTBEHA.1220@server53...
> Hi,
> I am using SQLDataCompareComandLine Sample that comes with Toolkit to
> compare tables in Northwind and Northwind2(I created this database for
> testing purposes) databases.
> When I am running this project in debug mode with /sync parameter, and
> /out:NorthwindCompare.txt, all tables get synchronized and I get
> NorthwindCompare.txt with all the differences. But where is the update
> script its self?
>
> Thanks,
> Jane
>
>
This discussion has been closed.