October 14, 2011 at 9:40 am
We have an alert that allows us to monitor the system TempDB on SQL 2005 and 2008 instances. The monitor basically monitors the TempDB and reports back the LogSpaceUsed% if for 30 straight minutes the threshold is over 60% [fyi, I runs DBCC SQLPERF ('logspace')behind the scenes]. The LogSpaceUsed% value does go down, but never to an acceptable level (for instance the log file size is 16 GB and 8 GB or 50% never seems to clear).
How do I go about finding what exactly is in the Temp DB using these resources so I can start to troubleshoot the calls? What is the best way of tackling finding out the contents.
Any thought or help would be appreciated.
October 14, 2011 at 12:51 pm
Why not just shrink it with DBCC SHRINKFILE commands and/or create mulitple files?
October 14, 2011 at 1:11 pm
I do not think you understand. Why shrink the Temp DB? Llet me start again.
System TempDB has 1 LDF device of 16 GB. We get alerts when the TempDB Usage is over 60%, meaning there are transaction using the TempDB. Once a transaction is finished, it should clear out of the log. I am looking for help finding the best way to see what is actually using resources in the TempDB log at any given time. I am not looking shring Temp DB (and this is definitely not recommended practice from Microsoft). I want the 16 GB log file, I just want to see if I can find out what is using the space.
"Hmmm. Lets go see what is utilizing the TempDb right now."
Thx!
October 14, 2011 at 2:37 pm
give this a shot, hope it helps!
October 14, 2011 at 3:01 pm
That is exactly what I needed. If I find any issues, I will post it. Thanks!
October 22, 2012 at 1:43 am
thanks guys. also helped me
Ian Cockcroft
MCITP BI Specialist
October 22, 2012 at 9:57 am
brekher (10/14/2011)
Why not just shrink it with DBCC SHRINKFILE commands and/or create mulitple files?
How about because if you try to do a shrink on temp db while the server is in other than a single user mode, you could end up corrupting databases.
Also, shrinking Temp DB is normally a futile exercise unless you've found out and fixed whatever made it grow beyond expectations.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 22, 2012 at 1:38 pm
Jeff Moden (10/22/2012)
a futile exercise
we are Borg 😀 😉
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply