How you get Database Size in SQL:
To get Database Size in SQL:
use 'Your Database Name'
exec sp_spaceused
OR
SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name,
Physical_Name, (size*8)/(1024*1024) SizeGB
FROM sys.master_files
WHERE DB_NAME(database_id) = 'Your Database Name'
GO
No comments:
Post a Comment