August 1, 2016 at 11:58 pm
Hello, I am trying to restore a SQL DB where it's in redo/undo phase for more than 3 - 4 HRs on SQL Server 2016 (13.0.1601). Is there anyway I can check the status and find out the estimation completion time?
Please help as I am not sure if its stuck or should I wait for it complete or not.
Thanks!
August 2, 2016 at 1:44 am
You can check the status of your restore operation with the dynamic managment view sys.dm_exec_requests
To view only RESTORE/BACKUP operations you can include a where clause:
SELECT *
FROM sys.dm_exec_requests
WHERE command In ( 'RESTORE DATABASE', 'BACKUP DATABASE' )
One of the columns gives you percent_complete
August 2, 2016 at 2:34 am
Terje Hermanseter (8/2/2016)
You can check the status of your restore operation with the dynamic managment view sys.dm_exec_requestsTo view only RESTORE/BACKUP operations you can include a where clause:
SELECT *
FROM sys.dm_exec_requests
WHERE command In ( 'RESTORE DATABASE', 'BACKUP DATABASE' )
One of the columns gives you percent_complete
I thought that that didn't work for the redo/undo portions of a restore?
There's an article on the MSDN blog about tracking database recovery using various DMVs[/url] - makes use of the sys.dm_exec_requests for tracking the main recovery, and sys.dm_tran_database_transactions for the undo/redo bits.
Thomas Rushton
blog: https://thelonedba.wordpress.com
August 2, 2016 at 2:42 am
ThomasRushton (8/2/2016)
I thought that that didn't work for the redo/undo portions of a restore?
I was not aware of this. You are right.
There's an article on the MSDN blog about tracking database recovery using various DMVs[/url] - makes use of the sys.dm_exec_requests for tracking the main recovery, and sys.dm_tran_database_transactions for the undo/redo bits.
Great article. Bookmarked!
August 2, 2016 at 8:06 am
ThomasRushton (8/2/2016)
Terje Hermanseter (8/2/2016)
You can check the status of your restore operation with the dynamic managment view sys.dm_exec_requestsTo view only RESTORE/BACKUP operations you can include a where clause:
SELECT *
FROM sys.dm_exec_requests
WHERE command In ( 'RESTORE DATABASE', 'BACKUP DATABASE' )
One of the columns gives you percent_complete
I thought that that didn't work for the redo/undo portions of a restore?
There's an article on the MSDN blog about tracking database recovery using various DMVs[/url] - makes use of the sys.dm_exec_requests for tracking the main recovery, and sys.dm_tran_database_transactions for the undo/redo bits.
No, but you'll still be able to see the overall percent complete and runtime, etc for the parent task, it's better than nowt
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy