DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

SQL Server: Find database mdf and ldf physical file locations using T-SQL

By Ashok Nalam on 14 Feb 2014 | Category: SQL Server | Tagged: database file tsql 
  Discuss Add Comment   |  
Add rating Rate this resource   
The tip shows how to find database MDF and LDF physical file locations using T-SQL.

master--[YourDBName] GO SELECT name,filename FROM sysfiles GO --(OR)

SELECT name ,physical_name FROM sys.database_files

find database mdf and ldf locations using T-SQL

You can find more information from sysfiles and sys.database_files table columns.
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 8666  (Professional)
Location : INDIA
Home Page :
About : I am admin of this site.
Rate this resource
Add your Comment
Name Email WebSite
Captcha Refresh

Comments (0)
No comments found, click here to add comment.