Home > Database > Mysql Tutorial > 查询SQL Server表空间大小,便于了解占空间的是那些表

查询SQL Server表空间大小,便于了解占空间的是那些表

WBOY
Release: 2016-06-07 14:55:03
Original
1530 people have browsed it

来自: http://blog.csdn.net/htl258/article/details/4029767 无 drop table ##goexec sp_MSForEachTable @precommand=N'create table ##(表名 sysname,记录数 int,保留空间 Nvarchar(10),使用空间 varchar(10),索引使用空间 varchar(10),未用空间 varchar(

来自: http://blog.csdn.net/htl258/article/details/4029767
drop table ##
go
exec sp_MSForEachTable 

@precommand=N'create table ##(
表名 sysname,
记录数 int,
保留空间 Nvarchar(10),
使用空间 varchar(10),
索引使用空间 varchar(10),
未用空间 varchar(10))',
@command1=N'insert ## exec sp_spaceused ''?''',
@postcommand=N'select * from ## order by 记录数 '
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template