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
Solved

Database Recovery after mistaken restore

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

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.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

808 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