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 12»»

Backup/Restores for Database Mirroring Session Expand / Collapse
Author
Message
Posted Tuesday, January 29, 2008 8:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
Hi, Pls can anyone help me, am setting up Database Mirroring between two server using Developer Edition.

I did a full backup of the Principal Database and restore it onto the Mirror with no recovery, then did a transaction log back up, but when I try to restore it, I get error message (System.Data.SqlClient.SqlError: The log in this backup set begins at LSN 46000000259700001, which is too recent to apply to the database. An earlier log backup that includes LSN 46000000259200001 can be restored. (Microsoft.SqlServer.Smo)).

That the transaction log is too recent, to choose an earlier one with a different LSN, see the full error message below.

I restored the full back with no recovery, will I have to restore the transaction log "with recovery"or "with no recovery"


===================================

Restore failed for Server 'ADESINA\JUMOKE'. (Microsoft.SqlServer.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: The log in this backup set begins at LSN 46000000259700001, which is too recent to apply to the database. An earlier log backup that includes LSN 46000000259200001 can be restored. (Microsoft.SqlServer.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

Post #448890
Posted Tuesday, January 29, 2008 9:45 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, April 05, 2013 4:43 PM
Points: 1,473, Visits: 1,314
Did you restore your log file in order? If you miss any earlier log file, you will get the error message.
Post #448966
Posted Tuesday, January 29, 2008 10:35 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
Hi, thanks for the reply, the database am using has a job that backs up the transaction log every day, so I guess there will be loads of log files.

What I did was take the full backup, restored it with "no recovery" then a transaction log backup after that and restored only that transaction log backup. Am doing it as a test not production, would I have to restore all the previous log backup ( there are many of them and from what date).
Post #449003
Posted Tuesday, January 29, 2008 12:39 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, April 05, 2013 4:43 PM
Points: 1,473, Visits: 1,314
You need to restore the full backup first. Then,
The very first log backup after the full backup.
The second log backup after the full backup.
...
Post #449049
Posted Tuesday, January 29, 2008 12:44 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:46 AM
Points: 41,528, Visits: 34,444
fosco (1/29/2008)
would I have to restore all the previous log backup ( there are many of them and from what date).


Yes. You have to restore the log backups, in order, starting with the first one after the full backup that you used.

If you're setting up database mirroring, all or your transaction log backups, including the last must be restored with no_recovery



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #449054
Posted Tuesday, February 05, 2008 9:29 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, October 26, 2012 2:14 PM
Points: 402, Visits: 598
You can make use of these links to configure database mirroring in SQL Server 2005. If you have any queries pls, let us know. The below mentioned has all the screenshots attached and provides a step by step guidance.

http://sql-articles.com/index.php?page=articles/cng-dbmrr.htm
http://sql-articles.com/index.php?page=articles/dbmrr.htm

Hope this Helps


- Deepak
Post #451994
Posted Wednesday, February 06, 2008 2:47 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 20, 2008 5:57 AM
Points: 38, Visits: 255
Thanks
Post #452080
Posted Thursday, June 12, 2008 1:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, March 13, 2014 1:57 PM
Points: 386, Visits: 316
i am also getting the same error , while configuring log shipping , I did a full backup in PROD server and restored in COB and then took a log backup backup and while restoring it in COB server Error "which is too recent to apply to the database" (only one log backup is done )
Post #515703
Posted Thursday, June 12, 2008 2:07 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:46 AM
Points: 41,528, Visits: 34,444
Check that there's no automatic log backup job running and that the log hasn't been truncated between the full backup and the log backup you took.

The error 'too recent...' implies that there are log records missing.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #515708
Posted Thursday, June 12, 2008 2:34 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, October 26, 2012 2:14 PM
Points: 402, Visits: 598
Also ensure that nobody has truncated the log file using Backup log with truncate_only or no_log command. Because the usage of the above commands will break the LSN and hence your log shipping might fail..

- Deepak
Post #515723
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse