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.

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

SELECT name ,physical_name FROM sys.database_files
GO

Output:
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) : 9526  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (2)
 
1. By ZAP on 23 Oct 2023

 
2. By ZAP on 23 Oct 2023

 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys