My SQL Server was accidentally uninstalled. I didn't take a backup of all the databases. Is it possible to recover them?

2 Answers 2


The database files are probably still there - in the directory for data and log files.

Th default one is c:\ProgramFiles\MSSQL\MSSQL\MSSQL10_50\MSSQL\Data. If not default then you need to locate your files and attach them to SQL Server instance of the same or higher edition.

  • 1
    try a search with *.mdf *.ndf
    – Mickael
    Commented Sep 11, 2017 at 15:25

Yes you can

Go to "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA", here you can see your old db MDF and LDF Fils. and you can open those file in sql server as you used earlier.

Step 1 : Open SQL Management Studio

Step 2 : Open Connection

Step 3 : Right click on the "Database" folder and Click "Attach"

Step 3 : Click add Button and go to "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA"

Step 4 : Select your Database MDF file and Click Ok

Hope You are done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.