What are the challenges you face when working across database platforms? Take the survey
Options

Schema Comparison SDK and multi-threading

B.gafanovichB.gafanovich Posts: 3
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.

Comments

  • Options
    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
  • Options
    I'm only comparing live databases.
  • Options
    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
Sign In or Register to comment.