检查TempDB是否空间不足

时间:2013-12-03 19:43:44

标签: sql-server sql-server-2012

我正在使用SQL Server 2012.是否有任何DMV来验证TempDB是否ever空间不足?我正在寻找一个查询,它将提供tempdb已满的时间。

注意:我已经知道以下查询会提供current详细信息。

USE tempdb
exec sp_spaceused

参考

  1. Troubleshooting Insufficient Disk Space in tempdb

3 个答案:

答案 0 :(得分:3)

您可以检查错误日志,查看有关tempdb尝试增长但不能增长的消息。

该消息应该看起来像:

  

“无法为对象分配空间... in   数据库...因为......文件组已满。创建   通过删除不需要的文件,删除对象中的磁盘空间   文件组,将其他文件添加到文件组或设置   自动增长文件组中的现有文件。 “

答案 1 :(得分:1)

您可以检查错误日志,这些日志会指定您的tempdb已满,您需要增加空间或更好地管理空间,还要检查Troubleshooting Insufficient Disk Space in tempdb

答案 2 :(得分:1)

你看过Server Activity History Report了吗?

报告中的一个部分专门介绍了报告中的Sql Server活动图中的tempdb。这可能会显示过去tempdb的磁盘空间等历史记录。

Different aspects of SQL Server activity can be accessed from the SQL Server Activity graph. The reports that you can obtain by clicking a point on the SQL Compilations/sec graph line are as follows:
Connections and sessions
Requests
Plan cache hit ratio
tempdb characteristics
相关问题