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

Backup Job Hangs

tmssupporttmssupport Posts: 3
edited January 28, 2014 8:52AM in SQL Backup Previous Versions
We have been using red-gate's backup pro since July 2013, however after the minor releases at the beginning of December 2013 we have experienced a couple instances where a log backup execution hung and prevented further backups until the blockage was identified and resolved. When this has occurred we have observed the following.

1. SQL Server 2008 was unable to cancel the execution of the job. Manually restarting the red-gate backup service allowed SQL Server to abort the execution.
2. No backup attempt appears in the backup activity history.
3. No log backup file existed before process was cancelled. No log backup file existed after service restart.
4. No errors were reported.
5. The script being executed:
DECLARE @errorcode INT
DECLARE @sqlerrorcode INT
EXECUTE master..sqlbackup '-SQL "BACKUP LOGS [Billing]
	MAILTO_ONERRORONLY = [url=''address@domain.com]''address@domain.com[/url]'',
	COPYTO = ''\\ServerName\s$\Log Shipping\<Server>\<Database>'',
	THREADCOUNT = 7"', @errorcode OUT, @sqlerrorcode OUT;

IF (@errorcode >= 500) OR (@sqlerrorcode <> 0)
	RAISERROR ('SQL Backup failed with exit code: %d  SQL error code: %d', 16, 1, @errorcode, @sqlerrorcode)


  • Options
    peteypetey Posts: 2,358 New member
    When SQL Backup encounters a critical error, it generates a stack trace of events leading up to the error. This stack trace is then stored in a file named SQBCoreService_<instance name>_bugreport.txt, and is located in 'C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\' on Windows 2003 and older, and 'C:\ProgramData\Red Gate\SQL Backup\Log\' on Windows Vista and newer.

    Could you please check if that file exists on your system? If it does, could you please send it to us? If the file does not exist, it may be because the SQL Backup Agent service startup account does not have rights to create the file in that folder. You can test this by manually creating the stack trace file by running the following command from Query Analyzer/Management Studio when connected to the SQL Server instance:

    EXEC master..sqbutility 9997

    If the file is not created, try granting read/write permissions on the abovementioned folder to the SQL Backup Agent service startup account.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    There was not an error file at the location provided. After executing the SQL command a file was created successfully.

    date/time : 2014-01-27, 19:17:24, 418ms
    computer name : ...
    user name : ... <admin>
    registered owner : Windows User
    operating system : Windows NT New x64 Service Pack 1 build 7601
    system language : English
    system up time : 37 days 3 hours
    program up time : 5 days 2 hours
    processors : 8x Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
    physical memory : 1396/16371 MB (free/total)
    free disk space : (C:) 25.94 GB
    display mode : 1024x768, 32 bit
    process id : $4a8
    allocated memory : 32.52 MB
    command line : "C:\Program Files (x86)\Red Gate\SQL Backup 7\SQL2008\SQBCoreService.exe" -i SQL2008
    executable : SQBCoreService.exe
    exec. date/time : 2013-12-03 16:20
    version :
    compiled with : Delphi 7
    madExcept version : 3.0i beta 2
    callstack crc : $835fda28, $f53d4f4b, $6a8f8539
    exception number : 1
    exception class : EConversionError
    exception message : Dump callstack for Red Gate support purposes. Please ignore the EConversionError code.
  • Options
    peteypetey Posts: 2,358 New member
    The next time this error occurs, could you please run the

    EXEC master..sqbutility 9997

    command and send me the resulting file? That command will provide a snapshot of what SQL Backup is doing at that point in time.
    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.