getsimrangujral
SSC Veteran
Points: 207
More actions
February 5, 2013 at 4:00 am
#269856
Database size in GB ? easy way
Ant-Green
SSC Guru
Points: 113507
February 5, 2013 at 5:37 am
#1584323
Did you try Google or your favorite search engine?
select
DB_NAME(database_id),
sum(size) * 8 AS SizeInKB,
(sum(size) * 8) / 1024.0 AS SizeInMB,
((sum(size) * 8) / 1024.0) / 1024.0 AS SizeInGB
FROM
sys.master_files
GROUP BY
database_id
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply