Sql-server – My database has been deleted suddenly on the server how to recover it

recoverysql server

I'm running an application on windows server that connects to a SQL Server database.

Today, when I opened SQL Server Management Studio, I was surprised the database is not in the list of the databases!

I don't know what's the reason. I searched in the server files but I can't find the database and also in the recycle bin.

I put my database in C:\db\myWeb.mdf and suddenly it's been removed!

I used stealer phoenix to find the database files deleted on disk but unfortunately I didn't find the db then I tried to add new database with the same name of the deleted db but SQL Server Management Studio said that the database MyWeb already exists! That means it's somewhere on the server but I couldn't find it…

Can anyone tell me how to recover the database?

Best Answer

Before restoring from the latest full database backup, you can try Paul Randal's advise - set the database to the EMERGENCY mode and use a login that is a member of the sysadmin SQL Server role to access it. Keep in mind that you will be able only to read the data, as the database will be in the read-only mode.

Search Engine Q&A #4: Using EMERGENCY mode to access a RECOVERY PENDING or SUSPECT database