[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

How can I programmatically detect backup errors from SQL Server

I need a way to programmatically detect whether an error occured during a backup process.
I'm trying to avoid opening and parsing the SQL log files.
Any help will be highly appreciated.
0
Ephraim Wangoya
Asked:
Ephraim Wangoya
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
please see this document that describes the msdb table that contains the information:
http://www.glib.hcmuns.edu.vn/ebook/computer/SQLServer%206.5/msdb.htm


Table name           Description
sysbackupdetail	The devices used to backup (dump).
sysbackuphistory	Summary of each backup operation (dump).
sysrestoredetail	The devices used to restore (load).
sysrestorehistory	Summary of each restore operation (load).
sysvolumelabel	Latest volume label values that were generated.

Open in new window

0
 
dbaSQLCommented:
Aside from simply generating errors upon failed execution, you could do something like this:

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_23139167.html?sfQueryTermInfo=1+backup+histori+script

there's a nice procedure suggestion in there from chapmandew, you can use this to poll the backup results automatically
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now