The tip shows how to find database MDF and LDF physical file locations using T-SQL. Use master--[YourDBName]
GO
SELECT name,filename FROM sysfiles
GO
--(OR)
SELECT name ,physical_name FROM sys.database_files GO Output:
You can find more information from sysfiles and sys.database_files table columns.
|