Schema Comparison SDK and multi-threading

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

Schema Comparison SDK and multi-threading

Postby B.gafanovich » Mon Nov 16, 2009 9:20 am

Ive built a software that uses the comparison sdk on server asynchronous threads, but I have an odd problem.
The software compares one main database to several others each in a different thread (to decrease the total run time).
when I run the software on my local machine, all works fine (the results are save to a table on a different server).
But, when I run the program from another server, I get odd errors, sometimes about having a duplicate object in a database (case sensitivity problem, which is impossible since all the databases are case-insensitive)
other times I get a null reference exception, and occasionally it just works.

I really have no idea what can cause these problems, Ive tried to make a single-threaded version which does work fine on all machines, but I'm still confused as to why would the multi-threading would happen only on certain machines.
B.gafanovich
 
Posts: 2
Joined: Mon Nov 16, 2009 9:05 am

Postby Chris Auckland » Tue Nov 17, 2009 5:29 pm

Thanks for your post.

Are you comparing live databases or scripts in this comparison?

The reason I ask is becauase when you compare script folders, it will check the folder and all subfolders for SQL Scripts. Could it be that the script location on the 'other' server has subfolders containing other SQL scripts?
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Postby B.gafanovich » Wed Nov 18, 2009 7:47 am

I'm only comparing live databases.
B.gafanovich
 
Posts: 2
Joined: Mon Nov 16, 2009 9:05 am

Postby Chris Auckland » Wed Nov 18, 2009 7:12 pm

Thanks for your reply.

I had a little go and reproducing this and managed to experience similar symptoms as you reported.

It didn't happen every time, but every now and then, the app would throw 'A duplicate object name has been found' error.

I don't think it was ever the intention of the tool to support simultaneous comparisons within the same process, so I don't think this kind of scenario was ever considered in the test plan.

You might be able to get round this if you use separate app domains, or perform the comparisons in separate processes.

I'll see if I can get any further advice from the development team with regards to this issue.
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 2 guests