March 16, 2009 at 5:06 am
When I select a database then Reports, Disk Useage I can see the size of the database and the transaction log. When I select Disk space used by data files, I can see how much of the size is actually being used by the database. Where can I find this information for the transaction log?
I will need to do this on several servers so if it means a script I need to apply it to more than one server. Can anyone point me in the right direction? Thanks
Madame Artois
March 16, 2009 at 5:18 am
check out sys.database_files.
"Keep Trying"
March 24, 2009 at 3:14 am
I'm probably being a bit thick here but sys.database_files seems to only tell me about master.db and not my databases. I've looked in BOL but can't seem to find the key element; I'm one of those people that struggle with BOL.
What am I doing wrong?
Madame Artois
March 24, 2009 at 4:08 am
Here is the query that I'm using. I found it once on one of the SQL Server forums, but I don't remember where.
SELECT name AS 'File Name' , physical_name AS 'Physical Name', size/128 AS 'Total Size in MB',
size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB', *
FROM sys.database_files
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
March 24, 2009 at 4:26 am
Hi
Try this:
DBCC SQLPERF ( LOGSPACE )
Greets
Flo
March 24, 2009 at 4:51 am
Fabulous!! I'm on a bit of a learning curve here so thanks for your help
Madame Artois
March 24, 2009 at 5:23 am
You're welcome!
🙂
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply