Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 Administration
»
Can't Kill SPID “Transaction Rollback in...
26 posts, Page 2 of 3
««
1
2
3
»»
Can't Kill SPID “Transaction Rollback in Progress”
Rate Topic
Display Mode
Topic Options
Author
Message
GilaMonster
GilaMonster
Posted Sunday, March 03, 2013 10:51 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Welsh Corgi (3/3/2013)
I like the following.
sysprocesses is deprecated, will be removed in a future version and should not be used. Use sys.dm_exec_requests, sys.dm_exec_sessions and sys.dm_exec_connections instead.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1425978
GilaMonster
GilaMonster
Posted Sunday, March 03, 2013 10:54 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Welsh Corgi (3/3/2013)
GilaMonster (3/3/2013)
[quote]
Welsh Corgi (3/3/2013)
Most times I've seen that it's been a process that has some external component. DTC, remote procedure call, external access, extended procedure, backup. Killing a normal SQL process you shouldn't have any problems. Just don't do anything silly like restarting SQL part way through a rollback or deleting the transaction log.
Yes but what do you do when the rollback does not make any process 0% of 0% completed?
The vast majority times I've seen that, it's been one of the above cases and it's something outside of SQL that's 'stuck', there's no actual rollback to do and hence it can be ignored or SQL can be restarted, that's the 0%, 0 seconds remaining scenario.
When you have 0% and a non-0 seconds, you wait for the rollback to finish, checking that it's not waiting for anything that you can fix.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1425979
Welsh Corgi
Welsh Corgi
Posted Sunday, March 03, 2013 10:59 AM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
GilaMonster (3/3/2013)
Welsh Corgi (3/3/2013)
GilaMonster (3/3/2013)
[quote]
Welsh Corgi (3/3/2013)
Most times I've seen that it's been a process that has some external component. DTC, remote procedure call, external access, extended procedure, backup. Killing a normal SQL process you shouldn't have any problems. Just don't do anything silly like restarting SQL part way through a rollback or deleting the transaction log.
Yes but what do you do when the rollback does not make any process 0% of 0% completed?
The vast majority times I've seen that, it's been one of the above cases and it's something outside of SQL that's 'stuck', there's no actual rollback to do and hence it can be ignored or SQL can be restarted, that's the 0%, 0 seconds remaining scenario.
When you have 0% and a non-0 seconds, you wait for the rollback to finish, checking that it's not waiting for anything that you can fix.
In this case it was a Stored Procedure being blocked by T-SQL Code.
When I get the 0% there is nothing that I can do.
I would expect that it would not be stuck at 0%?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1425980
GilaMonster
GilaMonster
Posted Sunday, March 03, 2013 11:16 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Welsh Corgi (3/3/2013)
GilaMonster (3/3/2013)
Welsh Corgi (3/3/2013)
GilaMonster (3/3/2013)
[quote]
Welsh Corgi (3/3/2013)
Most times I've seen that it's been a process that has some external component. DTC, remote procedure call, external access, extended procedure, backup. Killing a normal SQL process you shouldn't have any problems. Just don't do anything silly like restarting SQL part way through a rollback or deleting the transaction log.
Yes but what do you do when the rollback does not make any process 0% of 0% completed?
The vast majority times I've seen that, it's been one of the above cases and it's something outside of SQL that's 'stuck', there's no actual rollback to do and hence it can be ignored or SQL can be restarted, that's the 0%, 0 seconds remaining scenario.
When you have 0% and a non-0 seconds, you wait for the rollback to finish, checking that it's not waiting for anything that you can fix.
In this case it was a Stored Procedure being blocked by T-SQL Code.
When I get the 0% there is nothing that I can do.
I would expect that it would not be stuck at 0%?
If it's 0% complete and a non-0 seconds remaining, you wait. Rollbacks take longer than the time to make the original changes, so if you're rolling back something that took 3 hours, it'll take longer than 3 hours to roll back. Just check that the rollback is not blocked or waiting for something you can fix.
I wouldn't kill the procedure in that case, I'd either kill the T-SQL that was causing the blocking or I'd get the person running it to stop the query (which amounts to the same thing)
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1425981
Welsh Corgi
Welsh Corgi
Posted Sunday, March 03, 2013 11:31 AM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
ok, thanks Gail.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1425983
Welsh Corgi
Welsh Corgi
Posted Sunday, March 03, 2013 11:40 AM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
How can you check the progress of a rollback?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1425985
GilaMonster
GilaMonster
Posted Sunday, March 03, 2013 1:08 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
You gave the command in your first post. KILL <spid> WITH StatusOnly
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1425997
Welsh Corgi
Welsh Corgi
Posted Sunday, March 03, 2013 1:50 PM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
GilaMonster (3/3/2013)
You gave the command in your first post. KILL <spid> WITH StatusOnly
Well that does not work. I get 0% of 0%.
Thank you.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1426008
GilaMonster
GilaMonster
Posted Sunday, March 03, 2013 1:53 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
It does work, it's the correct and only way to get the rollback status and progress.
Check what the rolling back session is waiting for.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1426009
Welsh Corgi
Welsh Corgi
Posted Sunday, March 03, 2013 2:02 PM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
GilaMonster (3/3/2013)
It does work, it's the correct and only way to get the rollback status and progress.
Check what the rolling back session is waiting for.
My experience is that it does not always work.
I have seen many threads in which this is a problem and does not work as it should.
How do you check what the rollback session is waiting for?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1426014
« Prev Topic
|
Next Topic »
26 posts, Page 2 of 3
««
1
2
3
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.