Home > Backup and Recovery > Backup and restore command Status

Backup and restore command Status


Whenever we are doing the restoration and backup task for big databases that time it could be tough for us to give a ETA to business owner. The below command help us to get the status at percent level of completion along with estimate completion_time.

 

 

Script:—

select d.name,percent_complete, dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time, Getdate() as now,

datediff(minute, start_time, getdate()) as running, estimated_completion_time/1000/60 as togo,

start_time, command

from sys.dm_exec_requests req

inner join sys.sysdatabases d on d.dbid = req.database_id

where req.command in (‘RESTORE DATABASE’, ‘BACKUP DATABASE’, ‘RESTORE LOG’, ‘BACKUP LOG’)

Advertisements
Categories: Backup and Recovery
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: