Options

CompareDatabases fails when using the SDK, but not the UI

asciikodeasciikode Posts: 3
edited August 4, 2016 3:39PM in SQL Comparison SDK 11
I am taking over a small console app that uses the SQL Data Compare SDK to run a sync between two database instances.
When I point the application to production, the process appears to hang on the CompareDatabases method in the SQL Data Compare.
In this app, we are just comparing the database and creating a change script, not actually committing the changes.
Registering both databases, setting the default options, and creating the mappings completes with no problems.
I am running the app in debug mode on my local machine, and pointing it to the production servers.

It doesn't throw any exceptions, and nothing appears to time out, it just spins for hours and hours.
The box that I am running the application on shows the resources being used at around 2 - 4%.
The SQL server is not located on site, in fact it's several states away.

Using the same sdc file in the Redgate UI, on the same box, completed the same process in under 10 minutes.

Running the database in development, against a virtual SQL server machine on the same box, completes the process in minutes.
I have tried painstakingly to create the same scenario against a development database, but have been unable to reproduce the same result.
The Redgate SQL Compare Engine dll version is 11.5.7.252.
SQL Box is SQLServer 2012 running on Windows 2012.

Is there some difference between the UI version 12, and the SDK version 11, in database locking, or any other situation that would cause this?
Just hunting for ideas, thanks.

Comments

  • Options
    Solved. The app was not properly respecting the table exclusions or where clauses that were in the SDC file. So the compare was just taking a very long time.
Sign In or Register to comment.