Smash125
Hall of Fame
Points: 3547
More actions
December 11, 2014 at 5:53 am
#301753
how can i check how much space is allocated to the database in SQL Server
pinky
SSCommitted
Points: 1997
December 11, 2014 at 7:05 am
#1764045
SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name, (size*8)/1024.0 SizeMB, cast((size*8)/1024.0/1000 as decimal(9,3)) SizeGB
FROM sys.master_files
order by 1
ScottPletcher
SSC Guru
Points: 100262
December 11, 2014 at 4:03 pm
#1764245
EXEC sp_helpdb '<your_db_name>'
SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply