This blog is useful to all my friends who are working on the .Net Technology and wants to enhance their skills as well their problem solving ability.

Friday, June 22, 2012

Know the SQL database size in mb kb and GB


SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name,
Physical_Name, (size*8)/1024 SizeMB,
(size*8) / 1024 AS '(MB)',
((size*8) / 1024) / 1024 AS '(GB)'
FROM sys.master_files
WHERE DB_NAME(database_id) = 'Chromalox'





No comments: