解决方法
基于sql Server 2005,尝试这样做
SELECT (size * 8)/1024.0 AS size_in_mb,CASE WHEN max_size = -1 THEN 9999999 -- Unlimited growth,so handle this how you want ELSE (max_size * 8) / 1024.0 END AS max_size_in_mb FROM <YourDB>.sys.database_files WHERE data_space_id = 0 -- Log file
对于所有数据库大小的总体来说,尝试DBCC SQLPERF
DBCC sqlPERF (LOGSPACE)
这应该在sql 2000/2005/2008中工作