<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xml:base="http://www.red-gate.com/MessageBoard/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Red Gate forums: SQL Comparison SDK 10</title>
 <link>http://www.red-gate.com/MessageBoard/</link>
 <description>Product Support and Discussion</description>
 <language>en</language>
 <copyright>Copyright Red Gate Software Ltd</copyright>
 <managingEditor>internalsupport@red-gate.com</managingEditor>
 <webMaster>internalsupport@red-gate.com</webMaster>
 <docs>http://blogs.law.harvard.edu/tech/rss</docs>
 <ttl>60</ttl>
 <lastBuildDate>Thu, 23 May 2013 10:12:48 GMT</lastBuildDate>
 <pubDate>Thu, 23 May 2013 10:12:48 GMT</pubDate>
 <image>
  <url>http://www.red-gate.com/messageboard/templates/subRed/images/logo_phpBB.gif</url>
  <title>Red Gate forums: SQL Comparison SDK 10</title>
  <link>http://www.red-gate.com/MessageBoard/</link>
 </image>
 <item>
  <title>RE: Get List of Dependencies</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62095#62095</link>
  <description>Never mind - found it in Migrations VersionedWork</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17227</comments>
  <dc:creator>sebling</dc:creator>
  <pubDate>Wed, 22 May 2013 17:58:19 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62095#62095</guid>
 </item>
 <item>
  <title>Get List of Dependencies</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62094#62094</link>
  <description>WIKI shows using Work.ProcessDifferences but no such method exists in SDK 10</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17227</comments>
  <dc:creator>sebling</dc:creator>
  <pubDate>Wed, 22 May 2013 17:53:36 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62094#62094</guid>
 </item>
 <item>
  <title>RE: SQL Compare SDK removing users from database</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62061#62061</link>
  <description>The solution to this issue is to loop through the objects in the database, ensure you set all the users .Selected = false then the SQL compare will completely ignore them.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17192</comments>
  <dc:creator>chris.brown</dc:creator>
  <pubDate>Tue, 21 May 2013 15:08:22 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62061#62061</guid>
 </item>
 <item>
  <title>SQL Compare SDK removing users from database</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62031#62031</link>
  <description>When I compare my database with a database creation script created from a VS 2010 data-tier application project, the users are removed my database.
&lt;br /&gt;

&lt;br /&gt;
In the dta project, I have defined a database role, but there are no users as these are created within the installer in which SQL Compare SDK is implemented. 
&lt;br /&gt;

&lt;br /&gt;
In my code I have set the options IgnoreUsers and IgnoreUserProperties but I can't stop the users being removed.
&lt;br /&gt;

&lt;br /&gt;
Has anyone come across this problem and/or know any solution?
&lt;br /&gt;

&lt;br /&gt;
Thanks.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17192</comments>
  <dc:creator>chris.brown</dc:creator>
  <pubDate>Mon, 20 May 2013 14:02:37 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62031#62031</guid>
 </item>
 <item>
  <title>Force updates rather than inserts</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62003#62003</link>
  <description>Hi,
&lt;br /&gt;

&lt;br /&gt;
I'm trying to do a comparison every 15 minutes and keep a target database up to date. I have fields whereby I can filter what has been added, and what has been changed in the last 15 minutes.
&lt;br /&gt;

&lt;br /&gt;
Problem is, adding that filter makes it want to &amp;quot;insert&amp;quot; all records that have changed, because they don't appear to be in the target data because they have not changed there. Is there a way to force the generation of SQL to always make update statement not inserts?
&lt;br /&gt;

&lt;br /&gt;
Dino</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17174</comments>
  <dc:creator>dinonz</dc:creator>
  <pubDate>Fri, 17 May 2013 14:33:02 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62003#62003</guid>
 </item>
 <item>
  <title>RE: Generate Comparison Results Report</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61981#61981</link>
  <description>Never mind.  I found a line in the SDK help that says it's not supported since its a UI function only.  
&lt;br /&gt;

&lt;br /&gt;
There are some code samples in the wiki that shows a brute force method for emulating it, I'll just work with that.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17160</comments>
  <dc:creator>clamk123</dc:creator>
  <pubDate>Thu, 16 May 2013 20:11:03 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61981#61981</guid>
 </item>
 <item>
  <title>Generate Comparison Results Report</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61979#61979</link>
  <description>One of the thngs we do with SQL Compare is generate the &amp;quot;Generate Comparison Results Report&amp;quot; under Tools in the menu.
&lt;br /&gt;

&lt;br /&gt;
What I'd like to do is do this same things through the API, however I'm having difficulty finding where and how to accomplish that via code.
&lt;br /&gt;

&lt;br /&gt;
The result I'm trying to accomplish is to do exactly what would happen through the UI if I compared two databases, went to Tools&amp;gt;Generate Comparison Results Report, and chose to output a file as Format: XML.
&lt;br /&gt;

&lt;br /&gt;
Is this something than can be done, and if so, can you point me to some documentation/code sample/class names to accomplish this?</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17160</comments>
  <dc:creator>clamk123</dc:creator>
  <pubDate>Thu, 16 May 2013 19:28:25 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61979#61979</guid>
 </item>
 <item>
  <title>RE: Compare Database throws NullReferenceException</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61814#61814</link>
  <description>I can decode the stack frames at my end and the method names do point towards a problem with collations.
&lt;br /&gt;

&lt;br /&gt;
If you don't have any joy, I'll email you a link to our debugging tool and that may help.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17038</comments>
  <dc:creator>Brian Donahue</dc:creator>
  <pubDate>Wed, 08 May 2013 14:40:01 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61814#61814</guid>
 </item>
 <item>
  <title>RE: Compare Database throws NullReferenceException</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61770#61770</link>
  <description>Hi,
&lt;br /&gt;

&lt;br /&gt;
We are not comparing to scripts, we are comparing a database tables with another database tables.
&lt;br /&gt;

&lt;br /&gt;
In the command CompareDatabases() there are only three parameters, db1, db2, and mapping.  I have checked these and the are not null, I also checked the properties of these three objects, and none of the properties are null.
&lt;br /&gt;

&lt;br /&gt;
With regards to going further into the stack trace, as you can see, all the methods have been obfuscated. I am guess by you guys.
&lt;br /&gt;

&lt;br /&gt;
I will check the collation settings, but I am sure they are the same on both servers.
&lt;br /&gt;

&lt;br /&gt;
Thanks</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17038</comments>
  <dc:creator>MarkLFT</dc:creator>
  <pubDate>Mon, 06 May 2013 14:29:03 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61770#61770</guid>
 </item>
 <item>
  <title>RE: Compare Database throws NullReferenceException</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61769#61769</link>
  <description>Hello,
&lt;br /&gt;

&lt;br /&gt;
   It's hard to say from the stack trace, but it looks like something to do with collations or not knowing what the collation of the database is. Depends on if you are comparing scripts, or scripts to live databases, or something in the code. Scripts folders should have the table schema and the RedGateDatabaseInfo.xml file which should set the collation.
&lt;br /&gt;

&lt;br /&gt;
Or you could bypass the whole issue and use the option to do a binary comparison, but then it compares text case-sensitively and including white space and you may not want that.
&lt;br /&gt;

&lt;br /&gt;
Like with all null-ref exceptions, you want to debug and look at the local variables to see if anything is set to null and if those variables are being used. So the stack trace is part of the troubleshooting but I can't draw any definitive conclusions from it.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17038</comments>
  <dc:creator>Brian Donahue</dc:creator>
  <pubDate>Mon, 06 May 2013 14:19:59 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61769#61769</guid>
 </item>
 <item>
  <title>Compare Database throws NullReferenceException</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61743#61743</link>
  <description>I have a Windows Service application, that runs continuously.  The app will check for differences between two databases, and the syncs the changes from DB2 to Db1.
&lt;br /&gt;

&lt;br /&gt;
We use the DataCompare SDK to do this.  
&lt;br /&gt;

&lt;br /&gt;
The service will run for days, sometimes weeks with no problem.  But then without warning, it will throw a NullReferenceException on the command 
&lt;br /&gt;

&lt;br /&gt;
session.CompareDatabases(db1, db2, mappings);
&lt;br /&gt;

&lt;br /&gt;
If I restart the service it will sometimes go away, sometimes it will come back immediately.  Other times the problem will fix it self after a couple of hours.  But then reoccur a few hours later.
&lt;br /&gt;

&lt;br /&gt;
The job runs every few minutes, and is identical in its settings for every run.  So I find it confusing that we would get these errors so intermittently.
&lt;br /&gt;

&lt;br /&gt;
Can you please offer any advice, on how I can pint down the route cause.
&lt;br /&gt;

&lt;br /&gt;
To help I have attached a Stack trace from one of the errors.
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;#8ZK.#7ZK #pmc&amp;#40;String #A2Tb, String #K12b, String #aLPb, Boolean #NMrc&amp;#41;&amp;#58;330
&lt;br /&gt;
#8ZK.#pmc #89K&amp;#40;String #1Z, String #y0, FieldPair #M9rc, Boolean #N9rc&amp;#41;&amp;#58;97
&lt;br /&gt;
#8ZK.#pmc #89K&amp;#40;IComparable #WfVb, IComparable #H12b, FieldPair #M9rc, Boolean #N9rc, Boolean #O9rc&amp;#41;&amp;#58;397
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ResultsStore.Store IdenticalValues&amp;#40;Object value1, Object value2, FieldPair fieldPair, Boolean forceBinaryString, Boolean roundDoubles, Boolean treatEmptyStringAsNull&amp;#41;&amp;#58;434
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ComparisonSession #paL&amp;#40;Int32 #39rc, Object&amp;#91;&amp;#93; #09rc, Object&amp;#91;&amp;#93; #19rc, IList`1 #49rc, DifferencesSummary #59rc, Byte&amp;#91;&amp;#93; #29rc, Boolean #N9rc, Boolean #O9rc, Boolean #69rc&amp;#41;&amp;#58;17
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ComparisonSession #maL&amp;#40;#H1K #X9rc, #H1K #Y9rc, TableMapping #3Krc, ProgressPercentageTracker #luPb&amp;#41;&amp;#58;0
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ComparisonSession CompareDatabases&amp;#40;Database db1, Database db2, TableMappings mappings, SessionSettings sessionSettings, Boolean doNotBeDefeated&amp;#41;&amp;#58;1570
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ComparisonSession CompareDatabases&amp;#40;Database db1, Database db2, TableMappings mappings, SessionSettings sessionSettings&amp;#41;&amp;#58;0
&lt;br /&gt;
RedGate.SQLDataCompare.Engine.ComparisonSession CompareDatabases&amp;#40;Database db1, Database db2, TableMappings mappings&amp;#41;&amp;#58;0
&lt;br /&gt;
D&amp;#58;\_My Projects\Resort Manager\Dev\ResortManager\Utility Apps\RedGateWrapper\RedGateWrapper\SQLDataCompare.cs&amp;#58;190 in `SynchronizeData&amp;#40;IList`1 tableNames, SelectionDelegateType delegateType, TableMappingsType mappingsType, MappingOptions mappingOptions, Boolean applyWhereClause&amp;#41;`
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
[/code]</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17038</comments>
  <dc:creator>MarkLFT</dc:creator>
  <pubDate>Sat, 04 May 2013 06:56:55 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61743#61743</guid>
 </item>
 <item>
  <title>RE: Ignore Dependancies</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61674#61674</link>
  <description>Hi- 
&lt;br /&gt;

&lt;br /&gt;
Presumably in your code you've specified the options you want to use, with the Options enumeration. Quite possibly with &amp;quot;Options.Default&amp;quot;. 
&lt;br /&gt;

&lt;br /&gt;
Including dependencies is one of the default options (detailed &lt;a href=&quot;http://help.red-gate.com/help/SQLCompareAPIv10/0/en/index.htm&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;here&lt;/a&gt;) so to turn it &amp;quot;off&amp;quot; you need to replace your various Options settings:
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Options.default&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
with
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Options.IgnoreFileGroups | Options.IgnoreFillFactor | IgnoreUserProperties | IgnoreWhiteSpace | IgnoreWithElementOrder | IgnoreDatabaseNames | DecryptPost2kEncryptedObjects&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Hope that helps.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17000</comments>
  <dc:creator>james.billings</dc:creator>
  <pubDate>Wed, 01 May 2013 14:01:53 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61674#61674</guid>
 </item>
 <item>
  <title>Ignore Dependancies</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61638#61638</link>
  <description>How do ignore dependencies when you BuildFromDifferences?</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17000</comments>
  <dc:creator>MatthewB</dc:creator>
  <pubDate>Tue, 30 Apr 2013 08:37:48 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61638#61638</guid>
 </item>
 <item>
  <title>RE: How to inject additional SQL Code into script</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61543#61543</link>
  <description>Hello Myles, SDK doesn't specifically support slipstreaming SQL into the code written by the ExecutionBlock. What I do is pull apart the individual blocks and write them out in a loop -- then I can put my own custom SQL wherever I need to. Please see code sample here:
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://www.red-gate.com/supportcenter/content/knowledgebase/SQL_Comparison_SDK/KB200809000297&quot; target=&quot;_blank&quot;&gt;http://www.red-gate.com/supportcenter/content/knowledgebase/SQL_Comparison_SDK/KB200809000297&lt;/a&gt;</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=16940</comments>
  <dc:creator>Brian Donahue</dc:creator>
  <pubDate>Thu, 25 Apr 2013 09:16:25 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61543#61543</guid>
 </item>
 <item>
  <title>How to inject additional SQL Code into script</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=61499#61499</link>
  <description>As part of the differences/upgrade script produced, at the end and within the same transaction we want to be able to call stored procedures and update data tables (e.g. update the internal records that contain our database schema version).
&lt;br /&gt;

&lt;br /&gt;
Of course we want this to happen as part of the same transaction.
&lt;br /&gt;

&lt;br /&gt;
Is this possible?
&lt;br /&gt;

&lt;br /&gt;
We currently use the SQL Compare tool and then modify the script to perform these actions, but of course this cannot be done if we automate this process.
&lt;br /&gt;

&lt;br /&gt;
Or is there some way to wrap the current code up so that it uses an external transaction, and we can then perform the actions using normal ADO.NET functionality.
&lt;br /&gt;

&lt;br /&gt;
Thanks,
&lt;br /&gt;
Myles.</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=16940</comments>
  <dc:creator>mylesp</dc:creator>
  <pubDate>Wed, 24 Apr 2013 00:06:55 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=61499#61499</guid>
 </item>
</channel>
</rss>
