Solved

Database Recovery after mistaken restore

Posted on 2013-06-29
3
349 Views
Last Modified: 2013-06-29
Hello experts,

We have a SQL 2005 database with recovery model set to simple. The database name is DB3.

The most recent backup for this DB is at 5:00AM today.

By mistake, I restored another database (DB1) to DB3 by write clicking on DB3 in Management Studio, choosing restore, and restoring from DB1. ( I was trying to restore DB2, not 3).

Now I see that DB3 Data file size is 815MB, and Log file size is 236MB.

Is there any chance to restore the recent DB activity from morning till the restore time? If not, I will ask users to re-apply their today work.

You early reply is highly appreciated.
0
Comment
Question by:Muhajreen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 500 total points
ID: 39286808
Let's keep it simple:
>If you overwrote DB3 and DB3 was on SIMPLE recovery mode, then you can get the version up to the last DB3 full backup.  
> If you overwrote DB3 and DB3 was on FULL recovery mode, then you can get the version up to the last DB3 full backup and apply the logs up to the  last log backup before you overwrote DB3 by mistake.
> If you overwrote DB3 and do not have a full backup, you lost the data
> You can restore DB1 and overwrite DB2 as many times as you want from your last DB1 backup

Hope this helps.
0
 

Author Comment

by:Muhajreen
ID: 39286979
How to determine if my DB3 was on SIMPLE recovery mode? After restore I found it's recovery mode set to SIMPLE. Does that mean it was in simple before restore too?

Haytham
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39287098
After restore I found it's recovery mode set to SIMPLE. Does that mean it was in simple before restore too?
Unless somebody changed it after the restore, yes.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

734 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