SQL Server Admin
T-SQL Articles

June 19, 2010

TempDB Size and Monitoring




I was working on a requirement recently to monitor the TempDB to check on the space it was occupying. The requirement was to monitor and identify the TempDB space occupied by applications.

To find out the space used by all the TempDB files, use this simple query

SELECT SUM(size)*1.0/128 AS [TempDBSizeMB]
FROM tempdb.sys.database_files

However to monitor the TempDB size, I found a nice article by Sunil Agarwal called TempDB Monitoring and Troubleshooting: Out of Space to identify TempDB space allocations. Here’s the output that shows the allocations in TempDB by the currently running apps.

image

You can download the query here


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

 
  Feedback:

comments

0 Responses to "TempDB Size and Monitoring"
 

Copyright © 2009-2012 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions