When using SQL Backup Log Shipping, you might encounter issues where the log files get stuck when attempting to copy over to a different location. It is possible to troubleshoot this by resetting the Log Copy Queue and then re-attempting the job.
Below are the two queries for clearing the Log Copy Queue. Both of these queries should be ran against the master database of the SQL Server Instance from which the logs originates.
This first query will clear all the entries in the log copy queue which have not been successfully copied. Once a file has been copied the entry is updated with a status of S, so this deletes all entries that do not have a status of S. It is important to note that the S requires two single quotes to work and not double quotes.
exec master..sqbdata 'DELETE FROM backupfiles_copylist WHERE status <> ''S'''
This second query will simply delete everything no matter the status. You should only use this query if the first one does not appear to work.
exec master..sqbdata 'DELETE FROM backupfiles_copylist'
If you still encounter issues after trying the above, you can try using the USESIMPLECOPY keyword. This bypasses the log copy queue and will copy the log backup file in the same manner as the full backups. You will need to add this keyword to the scripts of the log shipping jobs with issue on the CopyTo and you can find that on the SQL Server with the SQL Backup Server Components.
Here is an example of how you would add USESIMPLECOPY to the job.
8
2
Was this article helpful?
5 out of 8 found this helpful
Articles in this section
- Resolving Error 507 and SQL Error 18456 in PCC Backup Restores
- SQL Backup error 605
- SQL Backup Error: Cannot access resource
- SQL Error 3203
- Error - Cannot load the DLL xp_sqlbackup.dll, or one of the DLLs it references
- Failed to obtain the list of cluster nodes
- Log Copy Queue is stuck in SQL Backup
- SQL Backup Network Share Permissions Test
- SQL Backup troubleshooting
- Errors when running a scheduled job with SQL Backup