SQL, Team Foundation Server, Windows

Verify TFS Backup Status

It seems as though when initiating a full backup in TFS (and of course depending on the size of your environment), TFS will report that it has successfully completed the backup even though it is not possible to complete a full backup of a 1TB database in 5 minutes:

414037While in the backup path the .bak files appear it still does not indicate (or possible for) that a backup has completed!

To truly see if a backup is taking place and what its current status is one can execute the following T-SQL query in SQL Server Management Studio:

SELECT command,
s.text,
start_time,
percent_complete,
estimated_completion_time/1000 as "seconds to go",
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) s
WHERE r.command in ('RESTORE DATABASE', 'BACKUP DATABASE', 'RESTORE LOG', 'BACKUP LOG')

Microsoft seem to be aware of this and have suggested that I submit feedback on this issue.

MSDN Forum Source
SQL Query Source

twitterredditpinterestlinkedinmail

Leave a Comment

Your email address will not be published. Required fields are marked *