Link to home
Start Free TrialLog in
Avatar of Omega002
Omega002Flag for Afghanistan

asked on

A query the polls backup history for SQL Server 200 & 2005 Database Servers?

Does any have a scripts that I can use to poll the backup history for 10 or more SQL Server 2000 & 2005 database servers? I am trying to create a global report on the backup history for all SQL DB servers 2000 & 2005 in our environment.
Avatar of chapmandew
chapmandew
Flag of United States of America image

If you are trying to do it for different servers I would gather the results of this query for all of the servers and store them into a table on one server:


select * from backupfile bf
join backupset bs on bf.backup_set_id = bs.backup_set_id
Sorry..pull the data from the msdb database.
Avatar of Omega002

ASKER

How would I just pull the job name,status on whether it failed or succeeded and display time started and time finished?
ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So every time I execute this procedure ts will delete all records in the target table then append new data? I executed this procedure and it generated errors. Will this work for SQL Server 2000 & 2005? Here is the error listed below:

(8 row(s) affected)

Server: Msg 208, Level 16, State 1, Procedure sp_Jobs, Line 33
Invalid object name 'msdb.dbo.fn_GetJobDate'.
Server: Msg 208, Level 16, State 1, Procedure sp_Jobs, Line 33
Invalid object name 'msdb.dbo.fn_GetJobDate'.
Do you have a query that I can use to populate a table with the same information then I can create a job to export the results then delete the temporary data. .