SQL Source Control caught in transaction

philcartphilcart Posts: 45
Microsoft SQL Server Management Studio 10.50.2500.0
SQL Source Control

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?



  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.
  • 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.

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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

    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.

Sign In or Register to comment.