SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As far as I known the database engine considers data only, thus excluding log files, unused spa
I always liked going after it directly:
SELECT DB_NAME( dbid ) AS DatabaseName, CAST( ( SUM( size ) * 8 ) / ( 1024.0 * 1024.0 ) AS decimal( 10, 2 ) ) AS DbSizeGb FROM sys.sysaltfiles GROUP BY DB_NAME( dbid )