Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

TEMPDB got deleted SQL 2012

I just got a frantic call from IT. It appears that someone had gone into a backup program(Backup Exec) and had clicked on what was the 'F' drive, got a prompt about formatting the drive and clicked 'Yes'. The problem was the drive he wanted to format was the 'G' drive, the 'F' drive had all the SQL data including the tempdb. Equally disturbing was the fact that all backups go to the drive he just formatted so there are no backups to restore since they did no cloud backup or even external drive backups. So now they expect me to be a miracle worker and restore the data. My question here is how can I at least recreate the tempdb database so I can get SQL 2012 back up and running?
0
rwheeler23
Asked:
rwheeler23
  • 4
  • 2
2 Solutions
 
Scott PletcherSenior DBACommented:
You can never recreate tempdb, as it's just a "scratchpad" area.  It's always recreated as an empty db when SQL Server starts up.

*Immediately* quarantine the drive and attempt to run some software on it to recover the files.  If he did a "quick format", most of the data is still actually there, just the directory is overwritten.
0
 
rwheeler23Author Commented:
They were using something called EasyUS to try to recover the data. If the data can be recovered, someone keeps their job. If not, the most recent updates are a week old and I have a long day ahead of me tomorrow.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Apart of some software that can recover files if you don't feel comfortable there's also some companies that will do the recovery work but the wise thing to do now it's not touch more in the F: drive.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
rwheeler23Author Commented:
They are running EasyUS to try to recover. It has been running for the past 12 hours.
0
 
rwheeler23Author Commented:
Thanks for offering the advice. The IT staff lives to see another day.
0
 
Scott PletcherSenior DBACommented:
Woohoo!  P.S.: You really should strongly consider adding daily backups of all dbs, including system ones, to your processes.
0
 
rwheeler23Author Commented:
That was my advice to these folks. I told them to at least get an external drive for now but then to look into cloud backup.  I almost passed out when they told me they had no backups! In today's day and age that is unforgivable.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now