Comments
1 comment
-
The extended stored procedure returns a failure status if SQL Backup encounters any errors or warnings. In this case, a warning was raised because one of the mirror files failed to be created.
An option may be to use the command line executable instead, and use the exit code value to check for warnings/errors, as warnings are in the range 1 to 499. Admittedly, this is a little cumbersome to work into a script.
I've logged an issue to propose that future extended stored procedures return an output value that indicates the actual warning/error code.
Add comment
Please sign in to leave a comment.
I am using the extended stored procedure. Here's an example command where the MIRRORFILE path doesn't exist, but the TO DISK does, and it still fails:
-SQL "BACKUP LOG [CRM88DMO] TO DISK = [\\mmofile\sqlbackups\MMOPSDEVAPP2\CRM88DMO\CRM88DMO_sqlbackup_2005-06-20_13.43.47.SQT] WITH NAME = [Database CRM88DMO, 2005-06-20_13.43.47], DESCRIPTION = [Backup on 2005-06-20_13.43.47 Database: CRM88DMO Server: MMOPSDEVAPP2], COMPRESSION=1,ERASEFILES_ATSTART
=3, MIRRORFILE= [ f:\sqlbackups2\CRM88DMO\CRM88DMO_sqlbackup_2005-06-20_13.43.47.SQT]" -E