SQL Source Control caught in transaction
philcart
Posts: 45
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
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
Comments
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.
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
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