While it is simple enough to SELECT DATABASEPROPERTYEX(@DatabaseName, 'MaxSizeInBytes') when connected to a user database, I have been unable to find how to get this information for all of the databases when connected to master.
I want to complete this query:
SELECT Name = d.name ,Edition = sdo.edition ,ServiceObjective = sdo.service_objective ,CurrentMaxGB = ds.? FROM sys.databases d JOIN sys.database_service_objectives sdo ON d.database_id = sdo.database_id JOIN ? ds ON d.database_id = ds.database_id WHERE d.name != N'master' ORDER BY d.name;
However, I have not been able to find a DMV to use for "ds". Can you help?