April 17, 2008 at 9:46 am
I went to DB Properties in SQL 2005 Management Studio
but it does'n show the location
of .MDF / .LDF files.
How to find out where they are located?
Thanks,
Robert
April 17, 2008 at 9:53 am
When you pull up the properties, click on the Files page. You will see where your .mdf and .ldf files are located there.
😎
April 17, 2008 at 8:48 pm
Additionally you can also run either query below:
EXEC sp_helpdb @dbname --Where @dbname is sysname or varchar
SELECT * FROM sys.sysfiles --Will return info for the current database
- Tim Ford, SQL Server MVPhttp://www.sqlcruise.comhttp://www.thesqlagentman.com http://www.linkedin.com/in/timothyford
April 18, 2008 at 12:50 am
You can know the location of the database files as well as their size, which is needed for monitoring, using the following script -
USE master
GO
SELECT B.[Name] AS [Database Name (Logical)],
A.[Name] AS [Physical Name],
A.[filename] AS [File Path],
A. AS [File Size]
FROM sysaltfiles A
INNER JOIN sys.databases B
ON A.DBID=B.Database_ID
--WHERE B.[Name]='PRACTICE'
GO
Note: You can specify the specific database name to find the exact details. the above script will give you the details for all the databases available on the SQL Server instance.
Chandrachurh Ghosh
DBA – MS SQL Server
Ericsson India Global Services Limited
Quality is not an act, it is a habit.
April 18, 2008 at 10:09 am
sysaltfiles.filesize
Is it in KB or MB ?
April 18, 2008 at 11:21 am
riga1966 (4/18/2008)
sysaltfiles.filesizeIs it in KB or MB ?
From BOL: File size, in 8-kilobyte (KB) pages
😎
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply