SQL see database sizes
Always wanted to do a query to see how large each database on your SQL server is, well it can be done using a simple and quick query.

The Query

SELECT sys.databases.name,
CONVERT(VARCHAR,SUM(size)*8/1024)+' MB' AS [Total disk space]
FROM sys.databases
JOIN sys.master_files
ON sys.databases.database_id=sys.master_files.database_id
GROUP BY sys.databases.name
ORDER BY sys.databases.name
Created: 26/04/2018 Total Comment: 0

Comments

(Not Displayed)
Human validation
Enter 2154 number, before submitting to confirm your human
[Home] [All Blogs] [Contact] [Me]