Log Ship CopyTo function failed silently
shu lee
Posts: 10
I am trying to use SQL backup 6.4.0.56 to setup log shipping between 2 servers. The source server is running Windows 2008 R2 and SQL server 2005. The destination server is running Windows 2003 and SQL server 2005.
Using the SQL Backup GUI I setup the "Backup location" to a local folder on the source server and the "Network copy location" to a share on the destination server. I clicked on the 'Test' button under 'Network copy location' and the GUI displayed the "Server has the correct permissions" text. The destination share has all permissions available to 'Everyone'.
From the SQL Backup GUI on the source server, I goto the jobs tab and I right click on the log shipping job and 'start' it. The GUI reports a successful run and I verify 1) the tran log was created on the local folder, 2) the tran log WAS NOT copied to the destination folder.
Viewing the history of the backup log ship job from SSMS indicates the log ship backup job completed successfully. Looking at the SQL Backup log, it also indicates the job completed successfully.
Here's the backup tsql generated by the SQL Backup GUI -
EXECUTE master..sqlbackup '-SQL "BACKUP LOG [TestLogShip] TO DISK = ''E:\sqlserver2005\Backups\LogsForLogShip\<TYPE>_<DATABASE>_<DATETIME YYYYmmddhhnnss>.sqb'' WITH ERASEFILES = 14, ERASEFILES_REMOTE = 14, FILEOPTIONS = 4, DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, COPYTO = ''\\192.168.100.215\LogsForLogShipSlave'', THREADCOUNT = 7"', @errorcode OUT, @sqlerrorcode OUT;
I also ran this with SSMS and got no errors.
Any ideas why the tran log was not copied to the destination share?
Thanks,
-Shu
Using the SQL Backup GUI I setup the "Backup location" to a local folder on the source server and the "Network copy location" to a share on the destination server. I clicked on the 'Test' button under 'Network copy location' and the GUI displayed the "Server has the correct permissions" text. The destination share has all permissions available to 'Everyone'.
From the SQL Backup GUI on the source server, I goto the jobs tab and I right click on the log shipping job and 'start' it. The GUI reports a successful run and I verify 1) the tran log was created on the local folder, 2) the tran log WAS NOT copied to the destination folder.
Viewing the history of the backup log ship job from SSMS indicates the log ship backup job completed successfully. Looking at the SQL Backup log, it also indicates the job completed successfully.
Here's the backup tsql generated by the SQL Backup GUI -
EXECUTE master..sqlbackup '-SQL "BACKUP LOG [TestLogShip] TO DISK = ''E:\sqlserver2005\Backups\LogsForLogShip\<TYPE>_<DATABASE>_<DATETIME YYYYmmddhhnnss>.sqb'' WITH ERASEFILES = 14, ERASEFILES_REMOTE = 14, FILEOPTIONS = 4, DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, COPYTO = ''\\192.168.100.215\LogsForLogShipSlave'', THREADCOUNT = 7"', @errorcode OUT, @sqlerrorcode OUT;
I also ran this with SSMS and got no errors.
Any ideas why the tran log was not copied to the destination share?
Thanks,
-Shu
Comments
and see if it provides any useful information?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Here are the top 3 records returned from that query:
name copystart copyend message
E:\sqlserver2005\Backups\LogsForLogShip\LOG_TestLogShip_20130402111500.sqb 2013-04-03 10:54:53.000 2013-04-03 10:54:53.000
E:\sqlserver2005\Backups\LogsForLogShip\LOG_TestLogShip_20130402110000.sqb 2013-04-03 10:54:53.000 2013-04-03 10:54:53.000
E:\sqlserver2005\Backups\LogsForLogShip\LOG_TestLogShip_20130402101500.sqb 2013-04-03 09:57:34.000 2013-04-03 09:57:34.000
The message column is empty.
Ok. This might sound odd, but it appears to me the file copying occurs almost 24 hour later. Looking at the 1st record above, note from the 1st filename that the log-create datetime is 2013-04-02-11:15:00. Then note that file's copyStart time is 2013-04-03 10:54:53. Does that sound right?
Thanks,
-Shu
I would like to see how many attempts had been made to copy that file, and from when the attempts started.
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Here's the result of your query:
E:\sqlserver2005\Backups\LogsForLogShip\LOG_TestLogShip_20130402111500.sqb 1 2013-04-03 10:54:53.000 2013-04-03 10:54:53.000
Seems like a normal 1 attempt.
How much of the file copying depends on msdb? Either before or after the copy?
-Shu
Were there a lot of copying activity going on during the specified interval?
None. Once the backup completes, the file name is placed in the backupfiles_copylist table, and is queued for copying.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I ask about the msdb because my last DBA neglected to setup a job to clean up msdb and as a result the msdb has entries going back to 2011. Because of that, it could take a long time to delete entries out of msdb.
-Shu
are there a lot of entries returned?
The copying task is independent of the msdb deletion task. Is SQL Backup set up to delete old entries from msdb now?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
SQL Backup is not currently setup to delete the old entries from msdb.
-Shu
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
-Shu
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
what is the result?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
If you look at the files that have already been copied (with a status of 'S'), how long does it take on average to copy a single file?
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8