SQLRx® Tip of the Month
 
April 2015
______________________________________________________________________________
SQL 2008

SQL Server Administration:  Query to check backup and restore progress. Sometimes backups or restores can take a while to complete. If an automated maintenance job is doing the work, you don't have access to the percent complete progress bar that is part of the SQL Server Management Studio GUI. Using the query you can check the backup or restore percent complete and will get an estimated time that it will complete.


SELECT session_id as SPID, command, a.text AS Query, start_time, percent_complete,

dateadd(second,estimated_completion_time/1000, getdate()) as estimated_completion_time

FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) a

WHERE r.command in('BACKUP DATABASE','RESTORE DATABASE','BACKUP LOG','RESTORE LOG')

 

 

SQLRx has worked hard to minimize the impact of monitoring SQL Servers to the point that we are able to monitor high transaction systems with little impact (1% load) on the target system. Contact us today to help you monitor your SQL servers!    
As always, don't forget to regularly monitor the 11 VitalSigns  used by SQLRx to debug performance bottlenecks.

If you have a SQL question you'd like us to answer, and possibly use for the next SQLRx Tip of the Month, email it to us!  If you missed any of our previous tips, you can view them here.

For assistance or more information on optimizing your SQL Server Environment, visit us at www.sqlrx.com or email Lori Brown at lorib@isi85.com.


 

Phone: 214.526.7680 x 113

Toll free:  800.85.SQLRx

https://sqlrx.wordpress.com/

@SQLRx


 


 

Integrated Services, Inc.                                    
2008 winner logo small
Turning Data Into Profit


 

30 Years of Credibility & Trust


 

Join our email list          Check out our events          SQLRx Downloads