SQL Backup job failed with exit code: 0

oberionoberion Posts: 41
edited February 13, 2006 12:55PM in SQL Backup Previous Versions
Quick question:

I have installed sqlbackup 4 pro edition on multiple servers now and it works fine until yesterday when I installed it on another production box.

I connected to crsprod1 via RDC last night and installed sqlbackup4, changed the sqlbackup agent service account, scheduled the job, and run a test run. It would come back with the following error:
Executed as user: DOM\SQLSERVER_DBA2. SQL Backup job failed with exit code: 0 SQL error code: 17 [SQLSTATE 42000] (Error 50000). The step failed.

In additiona, I am unable to manually backup any database via the sqlbackup UI but can do it via t-sql (backup database [db] to disk ...)

Could someone provide a solution? the backup sql code looks like this
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-SQL "BACKUP DATABASES [master, msdb, model]  TO DISK = ''F:\sqlbackups\sys_db_full\<AUTO>'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COPYTO = ''\\crsbk01\SQLBackups\crscentdbtst\sys_db_full\'', PASSWORD = ''<ENCRYPTEDPASSWORD>REMOVED</ENCRYPTEDPASSWORD>'', KEYSIZE = 256, ERASEFILES = 2, COMPRESSION = 3, THREADS = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT
IF (@exitcode <>0) OR (@sqlerrorcode <> 0)
BEGIN
  RAISERROR ('SQL Backup job failed with exit code: %d  SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END

thanks.

Comments

  • peteypetey Posts: 2,358 New member
    SQL Server error code 17 indicates that the SQL Server could not be found or access was denied. When you mention that the backup fails via the SQL Backup GUI, does it fail at the end of the backup wizard, or when you connect to it initially? What is the error that's displayed on the GUI?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • petey wrote:
    SQL Server error code 17 indicates that the SQL Server could not be found or access was denied. When you mention that the backup fails via the SQL Backup GUI, does it fail at the end of the backup wizard, or when you connect to it initially? What is the error that's displayed on the GUI?

    Petey, it fails right at the beginning of the job. I have two SQL service account that have the same exact permissions. I have used both and both had failed with the error I've indiciated.
  • peteypetey Posts: 2,358 New member
    In addition, I am unable to manually backup any database via the sqlbackup UI but can do it via t-sql (backup database [db] to disk ...)

    When you mention t-sql, do you mean you can make a backup using SQL Backup via Query Analyzer?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I think that this could also be a locking issue. If you look at the server's current activity and locks, does anything look unusual?
  • Petey,

    yeah, I was referring to useig the built in sql backup command via Query Analyzer
    backup database DB to disk = '\\path\to\backup'
    

    Brian,

    I tried backing one of my database via the GUI of the sqlbackup4 pro application and it would fail to backup as well. Does sqlbackup4 pro provide a more detail log somewhere so I can look and try to troubleshoot from there?

    thanks
  • peteypetey Posts: 2,358 New member
    You can find a log file in C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log (if C:\ is your system drive).

    What is the error if you run a backup using SQL Backup in Query Analyzer e.g.

    exec master..sqlbackup '-sql "BACKUP DATABASE [pubs] TO DISK ..."'
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • this is the log from C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log
    SQL Backup log file
    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
    

    when I run as domain user: dba2, using:
    exec master..sqlbackup N'-SQL "BACKUP DATABASE [Reference01]  TO DISK = ''F:\sqlbackups\usr_db_full\FULL_(local)_Reference01_20060210_203520.sqb'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COMPRESSION = 3"'
    

    I get the following output:
    SQL Backup (DLL v4.0.0.113)
    Backing up Reference01 (full database) to:
    F:\sqlbackups\usr_db_full\FULL_(local)_Reference01_20060210_203520.sqb

    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    SQL error code: 17

    (6 row(s) affected)

    name value

    exitcode 0
    sqlerrorcode 17
    filename01 F:\sqlbackups\usr_db_full\FULL_(local)_Reference01_20060210_203520.sqb

    (3 row(s) affected)


    Running the same t-sql statement as domain user: dba

    I get the same error output.

    MAYBE the following can help resolve this problem.

    This server runs 3 instances named: tst, stage, and mir

    tst is on port 3852
    stage is on port 1433
    mir is on port 1804

    this server is set up on a two node clustered and uses 3 virtual names:

    tst\tst
    stage\stage
    mir\mir

    When we use Windows Remote Desktop Connection to connect to these instances, we would type in 'tst' or 'stage' or 'mir'

    all of the names just listed are virtual ... it takes us to one of the active clustered server (either dbstage1 or dbstage2).

    When I connect directly to dbstage1 and not use the virtual name, I can't telnet into any of those ports using:

    telnet localhost 3852 or 1433 or 1804

    BUT

    when I do:

    telnet tst 3852, I get connected

    same goes for stage 1433 and mir 1804 ..

    maybe this has something to do with this whole mess? I know this is a complicated setup but still need to figure out a way to get this sqlback to work.

    please further advise.
  • peteypetey Posts: 2,358 New member
    Thanks for the detailed explanation. Pls download version 4.1, as it addresses an issue with named cluster instances, and another issue with instance names being the same as the server name.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • I downloaded and installed the new version 4.1 on my laptop to test first. During the upgrade process, I got some error:
    Cannot read mutli_sz value/kann den mutli_sz wert nicht lesen...

    I have no idea what the heck that means as it is not in English except for the beginning portion. The installation complete and I launched the sql backup GUI. In the database listing, I see duplicate databases. So the all the database is showing up 3 times instead of just once.

    I went ahead and uninstall the application and reinstall, the results are the same. What's the best way to upgrade this application without having to reinstall and prevent having the DB being listed multiple times?[/quote]
Sign In or Register to comment.