Red Gate forums :: View topic - Interesting issue with my comparisons
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

Interesting issue with my comparisons

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
fmeads



Joined: 16 Apr 2008
Posts: 4

PostPosted: Thu May 15, 2008 5:49 pm    Post subject: Interesting issue with my comparisons Reply with quote

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();
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6580

PostPosted: Wed Jun 04, 2008 2:01 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group