Interesting issue with my comparisons

Forum for users of SQL Toolkit 3,4,and 5

Interesting issue with my comparisons

Postby fmeads » Thu May 15, 2008 5:49 pm

Wrote a small app to generate differences between our stagging and production databases. When we tested it we found that object which existed in both systems but were different were not included in the generated script. Does anyone have any insights? Below is the code I'm using:

Differences sdiff = db1.CompareWith(db2, Options.Default);
Work wrk = new Work();
wrk.BuildFromDifferences(sdiff,Options.Default,true);
StreamWriter sw = new StreamWriter(FilePath);
ExecutionBlock blk = wrk.ExecutionBlock;
sw.Write(blk);
sw.Close();
fmeads
 
Posts: 4
Joined: Wed Apr 16, 2008 11:09 pm

Postby Brian Donahue » Wed Jun 04, 2008 2:01 pm

Hi Frank,

It's hard to say from the code fragment what the problem could be. I'd wager that it happens earlier in the program. Did you start with the Toolkit example project as a baseline to work from? In particular there is a loop where all difference objects have the selected property set to true. If this isn't done, then objects may not appear in the synchronization script. That's just a guess. The only way to work out why the result would not turn out as predicted would be to have all of your code and databases because this code fragment is not enough to go on.

Thanks!
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest