Sql Backup XP failed to recreate a backup
RayWest
Posts: 2
I have a stored proc that runs a number of times in different SQL server 2000 jobs to backup my production databases.
But if a backup fails I get the error email ok, but job shows as completed successfully.
@error which shows as zero even when proc fails.
Is there a way of trapping error externally of extended stored proc to force job to fail when backup fails.
But if a backup fails I get the error email ok, but job shows as completed successfully.
@error which shows as zero even when proc fails.
Is there a way of trapping error externally of extended stored proc to force job to fail when backup fails.
Comments
SQL Backup doesn't raise an error to the SQL Server Agent when backup jobs fail, and that is why the last run status is always reported as success. You can determine whether the SQL Backup extended stored procedure had succeeded or failed by checking the output, which will be 0 or 1 depending on success or failure. There is some more information on how to adjust your SQL Server Agent script here:
http://www.red-gate.com/messageboard/vi ... .php?t=974