This is my Technical area of troubleshooting and learning new Programming skills and many more. Here you will find answers for many new technologies like asp.net 2.0/3.5,4.0 C# access, mysql, Amazon Webservice ,Sql-server, JD Edwards, SAS, Salesforce, APIs, MVC and many more. please visit & discuss.
Tuesday, May 5, 2020
Get the size of all database in a SQL-Server
SELECT DB_NAME(database_id) AS DatabaseName,
sum((size * 8.0) / 1024.0) SizeMB
FROM sys.master_files
WHERE DB_NAME(database_id) in(SELECT name FROM sys.databases ) group by DB_NAME(database_id) order by 1
No comments:
Post a Comment