Exit Code 175

rick.sheeleyrick.sheeley Posts: 32
edited February 14, 2007 8:50PM in SQL Backup Previous Versions
EXEC master..sqlbackup N'-SQL "BACKUP LOGS [GDW_Timecard] TO DISK = '' <AUTO>'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', ERASEFILES = 325h , COMPRESSION = 1, THREADS = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT [SQLSTATE 01000] (Message 0) SQL Backup job failed with exitcode: 175 SQL error code: 0 [SQLSTATE 42000] (Error 50000). The step failed.

Can you give us a technical explanation of the issue?

Rick Sheeley, Sr. Production DBA
eTelecare
480-477-1411
[email protected]
Eric (Rick) Sheeley, Sr. SQL/Oracle DBA
Sacramento, CA Cell: 602.540.6750
"Those are my principles, and if you don't like them... well, I have others." - Groucho Marx

Comments

  • peteypetey Posts: 2,358 New member
    Warning code 175 indicates that SQL Backup failed to open the backup file to update its header information.

    When a backup completes, SQL Backup needs to write some header information related to the backup to the file. This header is in the first 1 KB of the file. When SQL Backup fails to open the file to write the header, it raises warning 175. It attempts to write the header twice more, in intervals of 5 seconds. After 3 attempts, it will abort the process, and raises error 775 instead.

    From your description, it appears that the header was indeed updated, just not on the first attempt. You can check if the header was updated by running the following:

    EXEC master..sqlbackup '-sql "RESTORE SQBHEADERONLY FROM DISK = [<file name>]" '

    If the LSN information is present, the header was written successfully.

    If you have antivirus applications running on your system, it is usual for them to lock the file momentarily after the file has been created, probably to scan the file for viruses.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • I follow you on this.

    Peter, can you supply us with a cross reference of warning codes to raise error codes, so that I can monitor these via SQL?

    Example :

    Warning Raise Error

    175 775



    or if you can point me at the correct documentation which gives this information.

    Cheers!

    Rick
    Eric (Rick) Sheeley, Sr. SQL/Oracle DBA
    Sacramento, CA Cell: 602.540.6750
    "Those are my principles, and if you don't like them... well, I have others." - Groucho Marx
  • The Error and Warning codes are in the help file under the Troubleshooting section in a topic called 'Errors'.

    The help file is in the install directory (sqlbackup.chm) or can be accessed via the help menu from within the application.

    Alternatively, the help file is also available online - http://www.red-gate.com/help/sqlbackup/sqlbackup.htm

    cheers,
    Helen
    Helen Joyce
    SQL Backup Project Manager
    Red Gate Software
  • Thanks, that is helpful.

    But I need to cross-reference which error code will be thrown for the different warning codes, so we can handle different error codes as they occur, and also be able to track them backwards from their source.

    Once again as an example:

    Warning Code (Throws Error code)

    175 775

    I don't need anything elaborate, just an e-mail with code cross-reference would suffice.

    If I need to contact your Dev group directly, that's fine. Just pelase let me know what I need to do to get the info.
    Eric (Rick) Sheeley, Sr. SQL/Oracle DBA
    Sacramento, CA Cell: 602.540.6750
    "Those are my principles, and if you don't like them... well, I have others." - Groucho Marx
  • peteypetey Posts: 2,358 New member
    There is one other warning code that may escalate to an error code, that is warning code 310. This happens when SQL Backup fails to perform a backup, and is reattempting the backups. If all attempts fail, then the actual error code of the backup is reported. Thus, there isn't a specific error code that warning code 310 maps to.

    For all other instances where we make multiple attempts to perform a task, we do not report warning codes when the task initially fails, only on the final failure. Warning codes 175 and 310 were the exceptions, as they assist in troubleshooting other issues.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.