Determine when rollback is complete
looking way add robustness here.
i'm issuing queries sql server instance (2008 r2 or 2012) , forcefully rollback transaction - typically in response application error occurred.
once rollback begun, i've noticed subsequent queries on database fail due timeout - presumably due rollback either keeping server busy, or holding locks new query tries acquire.
my question - there way determine when rollback complete? i've seen columns in system views such sys.dm_os_tasks , sys.dm_exec_sessions promising, no complete recipe on how information.
kill {spid} statusonly
gets rollback progress information, exists somewhere (and admittedly, might somewhere inaccessible through system dynamic management views).
so, suggestions?
-cd mark best replies answers!
hi daniel:
i use below script know status of rollback command , when completes.
select command,percent_complete,'elapsed'=total_elapsed_time/60000.0,'to complete' = estimated_completion_time /60000.0 sys.dm_exec_requests where
command '%rollback%'
output: see output below:
thanks,
thanks, satish kumar. please mark post answered if anser helps resolves issue :)
SQL Server > SQL Server Database Engine
Comments
Post a Comment