Sql-server – SQL Server database recovery

sql server

By mistake one of my colleague in the office has restored .mdf and .ldf files of another database to production with existing database name. So existing database was overwritten with new backup.

Is there any chance to recover that db back?

xyz database – .mdf & .ldf – restored as abc database (but already existing in production)

Best Answer

SQL Server recovery tools cannot help here, they can only recover lost information from database files (mdf, ldf, ndf, bak, trn). You should search for a way to recover overwritten files in Windows

One of the solutions is to use the File History option in Windows. Your Windows version must support it and it had to be enabled at the time when the files were overwritten and

"File History saves copies of your files so you can get them back if they are lost or damaged"

Restore files or folders using File History