Sql-server – Where does SQL Server store the MDF file paths

sql server

As the title suggests, where does SQL Server store the paths to the MDF files it will load at start up.

Our SQL Server is trying to load a file that is not there, reporting errors in the log, but failing to show the database in the treeview of Management Studio. So what I want to do is edit the table(?) that tells it to try and load this file at start-up, thus not creating the database. This will allow me to recreate the DB.

Best Answer

MSSQL 2005 stores the MDF locations within the system database "Master"

use master
select name,physical_name from sys.master_files
go

http://support.microsoft.com/kb/224071