Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

When log shipping is out of sync how to find LSN number Expand / Collapse
Author
Message
Posted Thursday, January 19, 2012 9:09 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 1:09 PM
Points: 26, Visits: 421
When log shipping is out of sync and we try to restore the transaction logs ,
it gives error that the LSN number.....is too late to restore, try a earlier one.
And at that time how can we know the LSN number of the transaction logs (which to be applied).
Post #1238803
Posted Thursday, January 26, 2012 1:45 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 1:09 PM
Points: 26, Visits: 421


Can anybody help with this issue? Thanks.
Post #1242443
Posted Thursday, January 26, 2012 2:04 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 21, 2013 8:43 PM
Points: 148, Visits: 566
First check the last file copied and restored to the secondary. Run the following queries on the secondary node.

The following query will give you the last log backup file that was copied

SELECT * FROM [msdb].[dbo].[log_shipping_secondary]

Then check what was the last log backup file that was restored.

SELECT * FROM [msdb].[dbo].[log_shipping_secondary_databases]

Based on the name of the last file restored, see what should be the next file that should be restored. Make sure that you check the files on both primary and secondary. One of the files might not have got copied.

Read the following post for more details.
http://saveadba.blogspot.com/2011/12/sql-server-log-shipping-could-not-find.html

You might get a better response if you posted this question in the 'Administration' section or the 'high availability' section


Blog
http://saveadba.blogspot.com/
Post #1242455
Posted Thursday, January 26, 2012 2:50 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 1:09 PM
Points: 26, Visits: 421

Thank you... I'll re-post. I would like to know how to resolve this when I see that they are out of sync...
Post #1242483
Posted Thursday, January 26, 2012 4:08 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, September 21, 2013 8:43 PM
Points: 148, Visits: 566
If you want to test this then set up log shipping in a test environment and delete/move a log backup file from the primary server before it gets copied to the secondary server.. That way you will be breaking the log chain.
I am sure you will see the same error as before.


Blog
http://saveadba.blogspot.com/
Post #1242520
Posted Friday, January 27, 2012 1:17 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 7, 2012 9:48 AM
Points: 40, Visits: 59
For resolving the logshipping out of sync issue. generally you have restore the full backup of your primary database to secondary server.
Post #1242650
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse