Microsoft : SQL Server : Monitor Database Recovery \ Restore Status

Microsoft : SQL Server : Monitor Database Recovery \ Restore Status

Get database recovery \ restore status



select 
	     tblRequest.session_id
	   , tblRequest.database_id
	   , db_name(tblRequest.database_id) databaseName			   , tblRequest.transaction_id
	   , tblRequest.command
	   , tblRequest.wait_type
	   , tblRequest.percent_complete
	   , tblRequest.reads			
	   , tblRequest.writes			

from   sys.dm_exec_requests tblRequest
where  (
	       (
                  tblRequest.command in (
                                            'DB STARTUP'
                                          , 'RESTORE DATABASE'
                                        )
               )
	    or ( tblRequest.transaction_id != 0)
       )		

 

Database Recovery Status
Database Recovery Status

 

Leave a Reply

Please log in using one of these methods to post your comment:

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