Created
April 10, 2020 21:05
-
-
Save georgepaoli/aba9a7bd2b3c83634814332180494cb7 to your computer and use it in GitHub Desktop.
Tamanho dos bancos no SQL Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Fonte: https://www.c-sharpcorner.com/blogs/check-database-size-in-sql-server1 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment