Red Gate forums :: View topic - SQL Source Control caught in transaction
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

SQL Source Control caught in transaction

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Thu Mar 29, 2012 1:22 am    Post subject: SQL Source Control caught in transaction Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6673

PostPosted: Mon Apr 02, 2012 3:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Mon Apr 02, 2012 10:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6673

PostPosted: Tue Apr 03, 2012 9:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Tue Apr 03, 2012 1:32 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group