Solved

Database Recovery after mistaken restore

Posted on 2013-06-29
3
336 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
  • 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Returning data in a different format 8 45
ASP.NET 5 Templates 2 65
What is format f12.8 for a CSV file 6 37
Query / Window function ? 3 13
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

932 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

14 Experts available now in Live!

Get 1:1 Help Now