Tuesday, January 31, 2012

SQL Server: Idera SQL Doctor

If you don't know much about SQL Server internals and its performance tuning techniques, but still need your SQL Server performance, right upto the mark, then you must try SQL Doctor, a really helpful tool by Idera. 
SQL doctor is a revolutionary technology that analyzes the performance of SQL Server and provides recommendations for improving performance.

Tuesday, January 10, 2012

SQL Server: Get All Databases Size

To get recent size of all databases on an instance, I have found following simple query very useful. 

SELECT  d.name,
        ROUND(SUM(mf.size) * 8 / 1024, 0) Size_MBs
FROM    sys.master_files mf
        INNER JOIN sys.databases d ON d.database_id = mf.database_id
WHERE   d.database_id > 4 -- Skip system databases
GROUP BY d.name
ORDER BY d.name