Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Regarding failed backup job information

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-02-13 : 08:16:44
Nikhil writes "Hi,

I want to monitor the backup jobs operation in sql 7, sql 2000 and sql 2005. I got all the information related to backup from the msdb database.
But i would like to monitor the backup failure operation. So Can any one tell me that from where i can get this information.
Either sql provide any table or any stored procedure or from the error log file.

Because if sql contains this information into the error log file then i have to parse the error log file because i want to monitor the backup job operation in the time interval.

Thanks in advance
Nikhil Kumar Jain"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-02-13 : 08:20:29
You can also get information from the job history table:

select j.name job, step_name step, step_id, message,
cast(cast(run_date as varchar) + ' ' + stuff(stuff(right('000000' + cast(run_time as varchar),6), 5,0,':'), 3, 0, ':') as datetime) runtime
from msdb..sysjobhistory h
inner join msdb..sysjobs j on h.job_id=j.job_id
where run_status=0 and cast(cast(run_date as varchar) as datetime)>getdate()-4
order by cast(cast(run_date as varchar) as datetime) desc, job, step_id, runtime desc


You can modify that query to look only at the job you're interested in (as written it will return data on all failed jobs in the past 4 days)
Go to Top of Page
   

- Advertisement -