SQL Server Database Sizes, Recovery Model and State (T-SQL)
Data, log and total size of each user database in MB, with recovery model, compatibility level and state. Uses the file type rather than the .mdf/.ldf name, so extra .ndf files are counted. Works on SQL Server 2016 to 2022 and later. — Data, log and total size per user database in MB (SQL Server…