Product:
Microsoft SQL server 2016
Microsoft Windows 2019 server
Issue:
List size and location of SQL database files?
Solution:
In SQL management studio enter this query;
SELECT db.name AS DBName, type_desc AS FileType, Physical_Name AS Location,mf.size/128 as Size_in_MB FROM sys.master_files mf INNER JOIN sys.databases db ON db.database_id = mf.database_id ORDER BY Size_in_MB DESC,DBName
More information:
How to determine free space and file size for SQL Server databases