In this post, I am providing a SQL Script to find Estimated Finish Time for the action of the SQL Server Backup Database.
When I am doing any action like backup and restore, every time I keen to know the estimated completion time.
This is also one of the important information for a organization and related clients to take decision for maintenance time.
Using SQL Server sys.dm_exec_requests, we can estimate the finish time. We can also populate completed and estimated percentage.
You can execute below query while the Database Backup is running. You can find a record like BACKUP COMMAND.
,percent_complete AS CompletedPercent
,DATEADD(MILLISECOND,estimated_completion_time,CURRENT_TIMESTAMP) AS EstimatedFinishTime
,(total_elapsed_time/1000)/60 AS TotalElapsedTimeInMIN
,DB_NAME(Database_id) AS DatabaseName
WHERE command LIKE '%BACKUP DATABASE%'
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.