views:

52

answers:

1

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 .

+1  A: 

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.

Remus Rusanu