/**9.sqlserver 查询数据库大小的方法**/
--总部要求每一个月,获取一次ERP数据库增长大小。
--原文出处:http://www.jb51.net/article/30993.htm
SELECT DB_NAME(database_id) AS [Database Name],[Name] AS [LogicalName],[Physical_Name] AS[Physical Name],((size *8) / 1024) AS [Size(MB)],[differential_base_time] AS[Differential Base Time]
FROM sys.master_files
WHERE DB_NAME(database_id) IN(‘Conductor‘)
GO
时间: 2024-10-10 23:01:17