Solved

How to restore Diff and log backups to SQL server 2012 database

Posted on 2015-02-22
7
76 Views
Last Modified: 2015-02-25
I had setup a Maintenance plan for my database as given below

1. Weekly FULL backup
2. Daily DIFF backup
3. LOG backup every 10 min


Now, client wants me to give some records which he by mistake overwritten using the application into the database.
He did this on Feb 20

Now, I have had restored the full backup dated Feb 15 to my local server.
And I am not able to restore the the differential or log backups I have for Feb 20 on this Database.
On the restore screen I am getting this error when I select either the differential or log backup
"unable to create restore plan due to break in the lsn chain".

 I am not sure how to restore the differential or log backups.

Need help here.
0
Comment
Question by:yadavdep
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 167 total points
ID: 40625168
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40625169
from the above link:
 Unable to create restore plan due to break in the LSN chain
Recently one of my colleague was working on restoring a database in SQL Server 2012 and the process had one Full database backup and one Differential Backup.
At first everything worked when they try to restore the full database backup with "No Recovery" and when they are trying to restore the differential backup, they were facing an issue which states "Unable to create restore plan due to break in the LSN chain."


Then we tried restoring the database using T-SQL scripts and it worked.
If you notice the screenshot, The information for "Restore to:" is empty which was supposed to show the timelines.
This seems to be a bug with SSMS and to work around this issue,
Right click on "Databases" folder and Choose "Restore Files and Filegroups..."


Now choose the differential backup file and this will restore the differential backup.

Open in new window

0
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 167 total points
ID: 40625299
Did you restore the full backup with the NO_RECOVERY option?
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

Author Comment

by:yadavdep
ID: 40628723
Hi Vitor,

At the first place I did not do what you said in your comment, but after doing some Google then I came to know that I need to chose No_Recovery option.
0
 
LVL 24

Assisted Solution

by:DBAduck - Ben Miller
DBAduck - Ben Miller earned 166 total points
ID: 40629471
Yes, in order to restore anything past Full backup, you need to check the box NO RECOVERY or the command on the RESTORE DATABASE command is WITH NORECOVERY.
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 40630089
It's working now?
0
 

Author Comment

by:yadavdep
ID: 40631166
yes Vitor it works now,
thanks every one for your help
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now