SQLServer如何查看数据库中表占用的磁盘空间
程序员文章站
2024-02-22 21:56:12
...
CREATE TABLE tb_SpaceInfoTable
(
ID int identity(1,1),
name sysname,
rows char(11),
reserved varchar(18),
data varchar(18),
index_size varchar(18),
unused varchar(18)
)
GO
EXEC SP_MSFOREACHTABLE
@COMMAND1 = 'INSERT INTO tb_SpaceInfoTable(name,
rows,
reserved,
data,
index_size,
unused)
EXEC SP_SPACEUSED ''?'''
GO
SELECT * FROM tb_SpaceInfoTable
GO
上一篇: 在.NET中取得代码行数的方法
下一篇: Ejb3持久化实体时的异常