2008得到当前实例的所有数据库的容量
时间:2011-04-28 来源:anivie
CREATE TABLE #helpdb(
[name] [nvarchar](128) NOT NULL,
[db_size] [nvarchar](13) NULL,
[owner] [nvarchar](128) NULL,
[dbid] [smallint] NULL,
[created] [nvarchar](11) NULL,
[status] [nvarchar](600) NULL,
[compatibility_level] [tinyint] NULL
) ON [PRIMARY]
insert into #helpdb EXEC sp_helpdb
select sum(cast(REPLACE(db_size,'MB','') as float)) as dbsize from #helpdb
drop table #helpdb
相关阅读 更多 +