August 18, 2016 at 3:57 pm
Comments posted to this topic are about the item Quick check server space and DB size
September 20, 2016 at 6:49 am
Seems to work fine. Thanks.
September 20, 2016 at 9:29 am
It is a great script and I modified your script below.
Select
volume_mount_point,
CAST(ROUND(max(vs.total_bytes)/1024.0/1024/1024, 2) as numeric(16,2)) TotalSpaceGB ,
CAST(ROUND(min(available_bytes)/1024.0/1024/1024, 2) as numeric(16,2)) FreespaceGB ,
Count(*) as DBFileCount
from sys.master_files S cross apply Sys.dm_os_volume_stats(s.database_id,s.file_id) vs Group by volume_mount_point
Go
Select
db_name(database_id) DBName,
CAST(ROUND(size*8.0/1024, 2) as numeric(16,2)) as SizeMB,
Physical_Name,
Name as Logical_Name
from sys.master_files order by size Desc
Go
Thank you for your sharing!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy