Log Shipping Fails
tlight
Posts: 6
Hello,
My company has purchased 7 instances of Pro. I am trying to Log ship between the servers but they keep failing with this error:
Executed as user: VMCLUSTER\Administrator. SQL Backup job failed with exitcode: 1100 SQL error code: 4326 [SQLSTATE 42000] (Error 50000). The step failed.
I have the job set up to backup every 15 minutes and copy to a network share. The restore is set to go off every hour. It was working last night until around 2am but started failing. I noticed the log backup failed with this error at 11:30pm:
Executed as user: VMCLUSTER\administrator. SQL Backup job failed with exitcode: 145 SQL error code: 0 [SQLSTATE 42000] (Error 50000). The step failed.
Heres the backup code:
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-sql "BACKUP LOG [Command] TO DISK = ''\\192.168.11.30\backups\DB4\Cmd\LOG_(local)_Command_<DATETIME yyyymmdd_hhnnss>.sqb'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COPYTO = ''\\Dc1\logshipping\Command\1'', COMPRESSION = 1, 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
Heres the restore code:
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-sql "RESTORE LOG [Command] FROM DISK = ''\\Dc1\logshipping\Command\1\LOG_(local)_Command_*.sqb'' WITH STANDBY = ''R:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\UNDO_Command.DAT'', MOVETO = ''\\192.168.11.30\backups\DB4\Cmd\re''"', @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
Both servers are Windows 2003 server with Sql Server 2000 enterprise. SQL Backup version is 4.6.0.815
My company has purchased 7 instances of Pro. I am trying to Log ship between the servers but they keep failing with this error:
Executed as user: VMCLUSTER\Administrator. SQL Backup job failed with exitcode: 1100 SQL error code: 4326 [SQLSTATE 42000] (Error 50000). The step failed.
I have the job set up to backup every 15 minutes and copy to a network share. The restore is set to go off every hour. It was working last night until around 2am but started failing. I noticed the log backup failed with this error at 11:30pm:
Executed as user: VMCLUSTER\administrator. SQL Backup job failed with exitcode: 145 SQL error code: 0 [SQLSTATE 42000] (Error 50000). The step failed.
Heres the backup code:
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-sql "BACKUP LOG [Command] TO DISK = ''\\192.168.11.30\backups\DB4\Cmd\LOG_(local)_Command_<DATETIME yyyymmdd_hhnnss>.sqb'' WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COPYTO = ''\\Dc1\logshipping\Command\1'', COMPRESSION = 1, 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
Heres the restore code:
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-sql "RESTORE LOG [Command] FROM DISK = ''\\Dc1\logshipping\Command\1\LOG_(local)_Command_*.sqb'' WITH STANDBY = ''R:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\UNDO_Command.DAT'', MOVETO = ''\\192.168.11.30\backups\DB4\Cmd\re''"', @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
Both servers are Windows 2003 server with Sql Server 2000 enterprise. SQL Backup version is 4.6.0.815
Comments
\Dc1\logshipping\Command\1 folder, and be picked up to be restored everytime.
Look for the SQL Backup log files (default location is C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name>) that contains warnings indicating which backup log files were already restored but not moved. Manually move these files.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Now it seems like everynight it fails from an error that says the log file is to late for the restore, and I copy one log file previous back into the shared folder and rerun the job successfully.
Is it moving the file even if it fails, or is it somehow not copying the file over at all and causing the failure. If its not copying the file over, how do I determine if it isnt and setting it to try again? I have both jobs set to try 4 times before failing.
Am I running the log shipping too much by shipping it every 15 minutes and restoring it every hour? Would it be better to slow it down (the db is about 30gbs big and grows rapidly)
Can you pls check the SQL Backup log files to see if it attempted to restore that transaction log? The log files are found in <system drive>:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name> by default. Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Thanks
Thanks
Could you pls check the SQL Backup log files (by default in <system drive>:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name> ) for the corresponding backups, to see if this was indeed the case? Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup log file
11/8/2006 7:15:01 PM: Backing up Command (transaction log) to:
\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_191501.sqb
11/8/2006 7:15:01 PM: BACKUP LOG [Command] TO DISK = '\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_191501.sqb' WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', COPYTO = '\\Dc1\logshipping\Command', COMPRESSION = 1, THREADS = 1
11/8/2006 7:15:01 PM: Error 510: Backup file exists. Will not overwrite. File name: (\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_191501.sqb)
and this:
SQL Backup log file
11/8/2006 8:15:01 PM: Backing up Command (transaction log) to:
\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_201501.sqb
11/8/2006 8:15:01 PM: BACKUP LOG [Command] TO DISK = '\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_201501.sqb' WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', COPYTO = '\\Dc1\logshipping\Command', COMPRESSION = 1, THREADS = 1
11/8/2006 8:15:01 PM: Error 510: Backup file exists. Will not overwrite. File name: (\\192.168.11.30\backups\DB4\Command\Log\LOG_(local)_Command_20061108_201501.sqb)
and it continues with that...
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8