惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

博客园 - qy1141

Mysql插入Emoji表情出错 spring+mybatis事务不起作用的原因 安卓开发随记 springmvc + spring + ibatis + mysql Eclipse中配置svn J2EE环境配置与工具使用 数据库备份与还原 关于数据库优化杂技 windows2008吃尽内存的解决办法 asp.net中http提交数据所遇到的那些坑 在C#中使用消息队列RabbitMQ 重新开博 WCF Security系列(2)--服务器端的安全 WCF Security系列(1)--Security概述 如果为网站生成自签名SSL证书 关于证书 转:最真实的2006年应届毕业生真实薪水 转:如何修复Team Foundation Server Workgroup Edition 不小心删除了所有Team Foundation Licensed Users组内用户问题 转 :TFS(Team Foundation Server)使用经验
SqlServer数据库空间使用情况常用命令
qy1141 · 2015-09-14 · via 博客园 - qy1141

2015-09-14 12:19  qy1141  阅读(612)  评论(0)    收藏  举报

--最简单的办法就是使用SSM客户端,报表查看
--查询数据文件的空间情况
dbcc showfilestats

--查询日志文件的空间情况
dbcc sqlperf(logspace)

--查询tempdb的空间情况
select * from sys.dm_db_file_space_usage

--查询表的占用空间情况
exec sys_viewTableSpace
--请慎用,对性能有影响 
--dbcc showconfig()
--日志诊断方法 select name,recovery_model_desc, log_reuse_wait,log_reuse_wait_desc
from sys.databases
where name = 'DbName1'