但insus.net想到的是,从下面的sql语句,就可以查询到数据库大小。因此分享于此。
复制代码 代码如下:
select db_name(database_id) as [database name],[name] as [logical name],[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(‘xxx’)
go