Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backup/Restores for Database Mirroring Session


Backup/Restores for Database Mirroring Session

Author
Message
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 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)
SQL ORACLE
SQL ORACLE
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1661 Visits: 1314
Did you restore your log file in order? If you miss any earlier log file, you will get the error message.
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 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).
SQL ORACLE
SQL ORACLE
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1661 Visits: 1314
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.
...
GilaMonster
GilaMonster
SSC Guru
SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)

Group: General Forum Members
Points: 55251 Visits: 44699
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, MVP, M.Sc (Comp Sci)
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


Deepak-405225
Deepak-405225
SSC-Addicted
SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)

Group: General Forum Members
Points: 450 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
fosco-515896
fosco-515896
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 255
Thanks
rajganesh.dba
rajganesh.dba
SSC-Addicted
SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)SSC-Addicted (414 reputation)

Group: General Forum Members
Points: 414 Visits: 323
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 )
GilaMonster
GilaMonster
SSC Guru
SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)SSC Guru (55K reputation)

Group: General Forum Members
Points: 55251 Visits: 44699
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, MVP, M.Sc (Comp Sci)
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


Deepak-405225
Deepak-405225
SSC-Addicted
SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)

Group: General Forum Members
Points: 450 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
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