Chat now with support
Chat with Support

LiteSpeed for SQL Server 8.9.5 - Security and Compliance Guide

Troubleshoot Log Shipping

Review the following solutions to help troubleshoot log shipping issues:

NOTE: For all log shipping scenarios, the best is to upgrade all of your servers to the latest LiteSpeed version.

Synchronize subscribers

To synchronize subscribers, you will need to create a transaction log backup of the Publisher database and then restore it to the Subscriber. Log shipping plan status is updated immediately after the synchronization is complete.

You may need to synchronize the Publisher and Subscriber in the following scenarios:

  • The Monitoring tab displays the overdue restoring task.

  • Some transaction log backup files had been removed from the publisher before they got to the Subscriber or they were manually removed from the Subscriber.
  • Subscriber server goes offline. (This will not stop backups from occurring or stop other subscribers from updating). Synchronize subscriber when the Subscriber server is online.

    If the Subscriber is permanently offline you will need to delete the existing plan and create a new log shipping plan or manually remove that server from the plan. For more information, see LogShipping_Remove_PrimarySubscriber.

To synchronize the publisher and subscriber databases

Do one of the following:

  • Right-click a subscriber database in the Monitoring tab and select Synchronize....
  • Run the following:

    /* On the publisher */

    EXEC msdb..sp_start_job @job_id = '<backup_job_id>'
    GO

    /* On the subscribers */

    EXEC msdb..sp_start_job @job_id = '<copy_job_id>'
    GO

    /* On the subscribers */

    EXEC msdb..sp_start_job @job_id = '<restore_job_id>'

Tip: To obtain job ids, right-click a subscriber database in the Monitoring tab and select Synchronize..., and then click View Script.

Reinitialize the plan

When you reinitialize the plan, LiteSpeed creates a full backup file with the <Publisher database>.bak name in backup share folder and then restores the backup directly to the Subscriber.

You may need to reinitialize log shipping, if the restore job fails.

The restore job may fail in the following cases:

  • The job is disabled.
  • Backup folder cannot be found.
  • Access to shared backup folder is denied.
  • LiteSpeed for SQL Server has been removed from the subscriber server.
  • The publisher database has been renamed, or removed, or not accessible.
  • The t-log was manually backed up on the Publisher and there were database changes.
  • Database is not in the "Stand by" or "No Recovery" state.
  • Synchronizing subscribers failed.

NOTE: Before you reinitialize log shipping, you need to fix the errors and prevent them from occurring in future.

To reinitialize log shipping

Right-click the Subscriber database in the Monitoring tab and select Reinitialize.

NOTES: When you reinitialize log shipping, the plan status is updated only after usual backup transaction log, copy and restore jobs are completed.

You can also re-initialize log shipping using stored procedures. For more information, see Reinitialize Log Shipping.

Bring the subscriber online

You may need to bring the Subscriber online, if you have a Log Shipping plan setup and the publisher fails.

To bring the Subscriber online

  1. Stop any LiteSpeed Log Shipping jobs.
  2. Run restore database with recovery to bring the subscriber database online.
  3. Remove the plan and setup the Log Shipping plan again.

Reverse log shipping roles

You may use the following instructions to make a subscriber act as a publisher and vice versa.

To reverse log shipping roles

  1. Delete the log shipping plan. For more information, see To delete a log shipping plan .
  2. Restore the subscriber database with recovery.
  3. Create a new log shipping plan. For more information, see Create Log Shipping Plans.

Manually remove log shipping plan components

For more information, see Remove LiteSpeed Log Shipping Plans.

To remove a native Log Shipping plan on SQL Server 2005 or higher, see http://msdn.microsoft.com/en-us/library/ms191297.aspx.

'Failed to login' error on 64-bit platform

If you use an alias to connect to a SQL Server with non-standard TCP port, the log shipping job may fail on a x64 platform with the 'Failed to login' error.

To workaround this issue

You have to define an alias for both 64-bit and 32-bit server configurations.

Log Shipping utility (SLSLogShip.exe) works as a 32-bit application on x64 platforms and uses x32 alias configuration.

Adjust copy settings

Log Shipping uses robocopy to internally move LiteSpeed files. Log Shipping began using the robocopy tool to copy files from the source to the target since LiteSpeed release 7.5. Robocopy is supported for Windows 7, Windows 8, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012 and above. Beginning with LiteSpeed release 8.0, the robocopy parameters can be changed in the Log Shipping section of the .ini file. The .ini file available values and default values are displayed below. Further information about robocopy is available at: http://technet.microsoft.com/en-us/library/cc733145.aspx.

Available values:
[logshipping]
userobocopy = true/false
numberofretries = decimal
waittimebetweenretries = decimal
numberofthreads = decimal (the parameter applies to Windows Server 2008 R2 and Windows 7 only)
copymode = zb/z/b

Default values:
[logshipping]
userobocopy = true
numberofretries = 60
waittimebetweenretries = 10
numberofthreads = 8
copymode = z

 

Related Topics

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating