SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


When log shipping is out of sync how to find LSN number


When log shipping is out of sync how to find LSN number

Author
Message
reggie burns-317942
reggie burns-317942
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 432
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).
reggie burns-317942
reggie burns-317942
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 432
Can anybody help with this issue? Thanks.
savethytrees
savethytrees
SSC Veteran
SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)

Group: General Forum Members
Points: 218 Visits: 680
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/
reggie burns-317942
reggie burns-317942
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 432
Thank you... I'll re-post. I would like to know how to resolve this when I see that they are out of sync...
savethytrees
savethytrees
SSC Veteran
SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)

Group: General Forum Members
Points: 218 Visits: 680
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/
umasingh
umasingh
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 59
For resolving the logshipping out of sync issue. generally you have restore the full backup of your primary database to secondary server.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search