What are the challenges you face when working across database platforms? Take the survey
Options

failed job status still says executing

programmer76programmer76 Posts: 12
edited August 6, 2007 11:10AM in SQL Backup Previous Versions
Hi,

Even the red get backup jobs I have created have either failed or cancelled because of not enough space in the disk where I was backing up the database, I still see job status as "executing Job step1". Is there any option I have to chose in red gate so that job in sql server agent is displayed as failed?

this is the entry in the redget back up log files.
Error 605: Error creating backup file(s). No files could be created.
Thread 0 warning:
Warning 210: Error writing to backup file:
Warning: System error code: (There is not enough space on the disk)

This is my job step code created automatically by redgate when i created the job...
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-SQL "BACKUP DATABASES EXCLUDE [master, msdb, model] TO DISK = ''\\99.111.999.333\backup\<AUTO>'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', DIFFERENTIAL, ERASEFILES = 10, MAILTO = ''abc@hotmail.com'', COMPRESSION = 2, THREADS = 1"', @exitcode OUTPUT, @sqlerrorcode OUTPUT
IF (@exitcode <>0) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup job failed with exitcode: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    The RAISERROR command that you see at the end of the script *should* cause the SQL Agent to flag the job as failed. I wonder if the backup process is hanging for some reason.

    If you look at the 'current activity' in Enterprise Manager/Management Studio, do you see a SQL Backup process running when there are no backups happening?
Sign In or Register to comment.