How to monitor a SQL Server Rollback with sys.dm_exec_requests

22 November,2011 by Jack Vamvas

SQL  Rollback Transaction  is easy with  sys.dm_exec_requests. The dynamic management view (DMV) sys.dm_exec_requests returns information about each request that is executing within SQL Server.

Instead of using Activity Monitor to view the status of a Rollback , use this T-SQL code

Activity monitor is based on window panes and is cumbersome to export any information.

Using  t-sql allows extra flexibility in reporting.

Note (13 th Sept,2019 ) - Matthias in comments below suggested to add der.reads and der.writes as part of the recordset. This will assist in presenting a more granular breakdown of Rollback progress - so even though it percentage complete may be on  certain % - the reads and writes will continue to change

 

select 
der.session_id, 
der.command, 
der.status, 
der.percent_complete,
der.reads,
der.writes
from sys.dm_exec_requests as der
where command IN ('killed/rollback','rollback')

 Read more  on tracking SQL Backups and INDEX reorganisations

SQL Server - Predict SQL BACKUP DATABASE finish time with sys.dm_exec_requests

Predict ALTER INDEX REORGANIZE finish time


Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to monitor a SQL Server Rollback with sys.dm_exec_requests


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer