SQL Source Control caught in transaction

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

SQL Source Control caught in transaction

Postby philcart » Thu Mar 29, 2012 1:22 am

Microsoft SQL Server Management Studio 10.50.2500.0
SQL Source Control 3.0.5.7

Getting latest included dropping some tables from the database. However, in a query window I had an uncommitted transaction for one of the tables.

This prevented "Get Latest" from finishing. Even clicking cancel didn't resolve the problem. The get latest dialog just sat there and wouldn't progress further. Had to End task SSMS.

Should the cancel button stop the process? What else is it for?


Thanks
Phil
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby Brian Donahue » Mon Apr 02, 2012 3:43 pm

Hi Phil,

Sorry to say, I don't have an explanation for this. The Cancel button should abort the entire series of currently running tasks associated with the GetLatest operation running at the time. Even if it has to wait for a particular transaction to complete, SQL Server's UMS should terminate the transaction rather than laeving it hang, so I do not know if the fault was in Source Control or that the SQL Server's scheduler was not handling the deadlock properly.

If the problem happens consistently, please let us know and we can try to debug it.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby philcart » Mon Apr 02, 2012 10:23 pm

Thanks Brian

The problem can be replicated easily enough.

Just set things up to have a "drop table" listed in Get Latest. Perform some sort of transaction on the table to be dropped, but don't commit the transaction.

Perform a get latest in SSC. SSC will be blocked by the uncommitted transaction. While waiting, click the cancel button.


Cheers
Phil
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby Brian Donahue » Tue Apr 03, 2012 9:54 am

Easier said than done -- if I drop the table, how can I then insert into the same table? And if I manually delete the table from source control and commit, SQL Source Control shows me I have a new table to commit to source control rather than a drop table in Get Latest. So reproducing this problem is not so easy for me.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby philcart » Tue Apr 03, 2012 1:32 pm

Brian

The table we had was dropped by another user on a dedicated development setup.

Your other option would be to delete the table from source control directly, not using SQL Source Control.


Cheers
Phil
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 0 guests