Michael
Michael

Reputation: 6405

SQL Server 2005 config file path of databases loaded

I need to find the path of the database (MDF) or at least the database logs loaded but for some reasons I cannot login through the SQL Server so I need to know if you know any file/config file that keeps the path of the databases or log file .

Upvotes: 0

Views: 916

Answers (1)

Remus Rusanu
Remus Rusanu

Reputation: 294187

sys.database_files has the details (path, filename, size etc) for every file in your database, including the MDF and the LDF

sys.master_files has the details of every file in every database.

You must have proper permission to view the content of these catalog views.

SQL Server stores the list of databases in master, and each database store its own list of files. There is no way to access the list from outside SQL Server. If you can't login, it means you don't have the rights to see that list to start with.

Upvotes: 1

Related Questions