数据库大小(报表用)

-- 数据库大小

CREATE TABLE #tmptb(NAME VARCHAR(100),db_size VARCHAR(100),
OWNER VARCHAR(500),dbid INT,created DATE,STATUS VARCHAR (500),
COMPATIBILITY_LEVEL INT,FILENAME VARCHAR(500))

INSERT INTO #tmptb(name,db_size,OWNER,dbid,created,STATUS,COMPATIBILITY_LEVEL) 
EXEC sp_helpdb

UPDATE #tmptb SET FILENAME = b.FILENAME

FROM #tmptb a INNER JOIN master.dbo.sysdatabases b ON a.dbid = b.dbid

SELECT name,db_size FROM #tmptb where dbid >= 5 order by db_size desc

DROP TABLE #tmptb

 

数据库大小(报表用),布布扣,bubuko.com

数据库大小(报表用)

上一篇:sqlite可视化工具以及django-South


下一篇:oracle应该安装在什么版本的linux下