This post falls firmly in the category of blocking and tackling, but is a question we all have to answer from time to time: “How big is this database?”
DB_NAME(database_id) AS DatabaseName
, Name AS Logical_Name
, ( CAST( SIZE AS BIGINT ) * 8 ) / 1024 / 1024 SizeGB
Both will get you size per database. The former allows you to see the breakdown of all files (the cast to BIGINT is for really large databases), and the latter returns the sum of all data and log files per database.