How to recover a DB with a missing .mdf file? I have a DB and when I detach it I cannot find its .mdf file. I only have .ndf and .ldf files in my DATA folder. Also, I do not have backup file...


How to recover my DB?
Can I do something without the .mdf file?


P.S. On this server, I have more DBs and most them have .mdf files. Only a few are missing their .mdf files. Why is that?
Technically, you don't have to have an MDF file. Your database and log files can be named any extension - MP3, PDF, ZIP, you name it. (Sometimes I play terrible jokes on my coworkers.)

If you want to check the file names before you detach the databases, run this query in the database you want to examine:

SELECT * FROM sys.database_files


You can also right-click on the database in SSMS and click Properties, then look at the files from there.