Full Backup Error - Exit Code 790, SQL Error Code 0

johnfredonejohnfredone Posts: 3
edited July 7, 2007 11:09AM in SQL Backup Previous Versions
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

Comments

  • peteypetey Posts: 2,358 New member
    Details of the error ought to be logged in the SQL Backup Agent log file. The default folder where the log files are stored is <system drive>:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name>.

    Look for a file generated during the time of the backup, that contains error 790.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • I checked in that location but I do not have any log files associated with this error.
  • peteypetey Posts: 2,358 New member
    Could you pls send me the 12 log files that were generated for that backup? Thanks.
    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.