Solved

Database Recovery after mistaken restore

Posted on 2013-06-29
3
333 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

763 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

6 Experts available now in Live!

Get 1:1 Help Now