Sunday, May 25, 2008

So How Long Is Team Server Taking to Backup?

The backups of our Team Server came into question the other day.
It was suspected that the backups were running for a very long time and during this long run they were degrading the performance of other aspects of Team System.

One of the cool things about SQL Server is nearly everything about SQL Server's operation that can be stored in a database, is stored in a database. The database 'msdb' contains information about backups in the tables 'backupset' and 'backupfile'. So the following query will show how long it took to run backups (adjust the date):


SELECT
s.backup_start_date,
s.backup_finish_date,
s.database_name,
f.logical_name,
f.file_type
FROM backupset s, backupfile f
WHERE s.backup_set_id = f.backup_set_id
AND s.backup_start_date > '2008-05-20 10:01:16.000';

No comments: