SQL Server 查看所有数据库所有表大小信息【简单版本】
2013-11-29 16:50
441 查看
查看数据库中各表的占用空间情况:
create table tablesize (name varchar(50),rows int,reserved varchar(50),
data varchar(50),index_size varchar(50),unused varchar(50))
insert into tablesize (name,rows,reserved, data,index_size,unused) exec
sp_msforeachTable @Command1="sp_spaceused '?'"
update tablesize set data=replace(data,'KB','')
select *,convert(int,data) as a from tablesize order by A desc
drop table tablesize
create table tablesize (name varchar(50),rows int,reserved varchar(50),
data varchar(50),index_size varchar(50),unused varchar(50))
insert into tablesize (name,rows,reserved, data,index_size,unused) exec
sp_msforeachTable @Command1="sp_spaceused '?'"
update tablesize set data=replace(data,'KB','')
select *,convert(int,data) as a from tablesize order by A desc
drop table tablesize
相关文章推荐
- SQL Server 游标运用:查看所有数据库所有表大小信息(Sizes of All Tables in All Database)
- SQL Server 游标运用:查看一个数据库所有表大小信息(Sizes of All Tables in a Database)
- SQL Server 游标运用:查看数据库所有表大小信息
- SQL Server 游标运用:查看所有数据库所有表大小信息
- SQL Server 游标运用:查看所有数据库所有表大小信息(Sizes of All Tables in All Database)
- QL Server 查看所有数据库所有表大小信息(Sizes of All Tables in All Database)【复杂版本】
- SQL Server 游标运用:查看一个数据库所有表大小信息(Sizes of All Tables in a Database)
- T-SQL系列之查看所有数据库大小、恢复模式等信息(MSSQL)
- WinForm查看SQL Server所有数据库表信息小工具
- SQL Server查看所有数据库文件信息
- SQL Server查看所有表大小、表行数和占用空间信息
- WinForm查看SQL Server所有数据库表信息小工具的一些用法总结
- 关于sql server动态获取数据库下所有表以及游标的简单使用
- SQL查看所有数据库的信息
- SQL Server 2005 查看数据库表的大小 按照表大小排列
- SQL Server查看所有表大小,所占空间
- 怎么快速高效地查看所用服务器的php版本等所有信息
- Oracle SQLServer MySQL查看当前所有数据库表名及其他信息
- 查询所有SQL用户的连接信息(可显示IP)\SQL Server中强制关闭数据库连接
- SQL Server查看所有表大小,所占空间