SQL Server 2005 config file path of databases loaded
I need to find the path of the database (MDF) o开发者_开发知识库r 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 .
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.
精彩评论