Friday, 9 January 2015

How to check database size

  -- HOW TO GET DATABASE SIZE IN INSTANCE LEVEL IN MEGABITES
SELECT DB_NAME(DBID),
            STR(CONVERT (DEC(15), SUM(SIZE)) * 8192 / 1048576, 10,2) + N' mb' AS DATABASE_SIZE
FROM sys.sysaltfiles
GROUP BY DBID ORDER BY 2 DESC



No comments:

Post a Comment