Log Shipping Error

  • The issue is the secondary server was renamed. If you check the servername you will notice it is incorrect.

    SELECT @@SERVERNAME

    These commands will correct the server rename and then it requires a restart of SQL Server.

    sp_dropserver 'WRONGNAME'

    GO

    sp_addserver 'NEWNAME', local

    GO

    If you cannot restart the SQL Server immediately then you will need to correct the secondary servers copy job and restore jobs commands.

    "C:\Program Files\Microsoft SQL Server\120\Tools\Binn\sqllogship.exe" -Copy 6494A057-7D63-4DAD-9A3F-1EBFCA98E1EE -server WRONGNAME

    "C:\Program Files\Microsoft SQL Server\120\Tools\Binn\sqllogship.exe" -Restore 6494A057-7D63-4DAD-9A3F-1EBFCA98E1EE -server WRONGNAME

    Change it to the new name of the instance

    "C:\Program Files\Microsoft SQL Server\120\Tools\Binn\sqllogship.exe" -Copy 6494A057-7D63-4DAD-9A3F-1EBFCA98E1EE -server NEWNAME

    "C:\Program Files\Microsoft SQL Server\120\Tools\Binn\sqllogship.exe" -Restore 6494A057-7D63-4DAD-9A3F-1EBFCA98E1EE -server NEWNAME

  • This solution worked for me.  I had cloned the primary server vm and renamed it but didn't rename the DB server internally.  Once I used the sp_Dropserver/sp_Addserver AND updated the Copy/Restore jobs, everything worked fully.

    -=JLK=-

  • I fixed this issue be deleting all logshipping configuration on primary and secondary servers by below steps

    Step 1.

    On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server. An example of the syntax for this is as follows:

    EXEC master.dbo.sp_delete_log_shipping_primary_secondary

    @primary_database = N’AdventureWorks’,

    @secondary_server = N’LogShippingServer’,

    @secondary_database = N’LogShipAdventureWorks’

    GO

    Step 2.

    Execute sp_delete_log_shipping_primary_database to delete information about the log shipping configuration from the primary server. This will also remove the SQL Agent backup job:

    sp_delete_log_shipping_primary_database N’AdventureWorks’

    Step 3.

    On the secondary server, we then need to execute sp_delete_log_shipping_secondary_database to delete the secondary database, as follows:

    sp_delete_log_shipping_secondary_database N’LogShipAdventureWorks’

     

    after that recreate the logshipping configuration .

     

Viewing 3 posts - 31 through 32 (of 32 total)

You must be logged in to reply to this topic. Login to reply