Full Backup Error - Exit Code 790, SQL Error Code 0
johnfredone
Posts: 3
I have a backup job that is backing up 12 databases and the job returns an exit code of 790 "General Thread Error" and no SQL Error Code (0).
The version of SQL Backup is 5.1.0.2781.
The backup files are created and look to be the correct size. There is only one Application Event Log error for the SQL Agent Job (Job code below) and there are no SQL Log for an error, just successful execution of the full backups. I am wondering why is the exitcode 790 when it is completing the backups successfully?
The code for the job is below. It backs up to our tape backup server which I removed the name and replaced with <SERVERNAME> and the folder with the originating server name with <SERVERFOLDER>
--This statement backs up all databases
declare @exitcode int
declare @sqlerrorcode int
exec master..sqlbackup N'-SQL "BACKUP DATABASES [*] TO DISK = ''\\<SERVERNAME>\backup\<SERVERFOLDER>\<database>_RG.bak'' WITH DESCRIPTION = ''<AUTO>'', INIT, VERIFY, COMPRESSION = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT
IF (@exitcode <> 0) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup step failed: exit code %d, SQL error code: %d',
16, 1, @exitcode, @sqlerrorcode)
END
The version of SQL Backup is 5.1.0.2781.
The backup files are created and look to be the correct size. There is only one Application Event Log error for the SQL Agent Job (Job code below) and there are no SQL Log for an error, just successful execution of the full backups. I am wondering why is the exitcode 790 when it is completing the backups successfully?
The code for the job is below. It backs up to our tape backup server which I removed the name and replaced with <SERVERNAME> and the folder with the originating server name with <SERVERFOLDER>
--This statement backs up all databases
declare @exitcode int
declare @sqlerrorcode int
exec master..sqlbackup N'-SQL "BACKUP DATABASES [*] TO DISK = ''\\<SERVERNAME>\backup\<SERVERFOLDER>\<database>_RG.bak'' WITH DESCRIPTION = ''<AUTO>'', INIT, VERIFY, COMPRESSION = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT
IF (@exitcode <> 0) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup step failed: exit code %d, SQL error code: %d',
16, 1, @exitcode, @sqlerrorcode)
END
Comments
Look for a file generated during the time of the backup, that contains error 790.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8