SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Alter Database statement blocked


Alter Database statement blocked

Author
Message
Rick Rollins
Rick Rollins
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1122 Visits: 94
This morning, I planned to refresh one of my development databases using a database restore. In order to restrict access to the database as I start the restore, I use ALTER DATABASE to set the database to single_user mode, specifying the ROLLBACK IMMEDIATE option. This typically works fine.

When I ran it this morning, I noticed that the alter was taking a long time. When I ran sp_who2, it showed my spid blocked by -2 and in a suspended status. I thought this might be due to a large rollback, but DBCC OPENTRAN showed no open transactions in this database.

Does anybody have any thoughts on why I was being blocked and put into a suspended status? Thanks in advance for your help.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search