I am facing a serious issue in my production server where the temp DB grow exponantialy. Is there any way we can recover the tempDB space without restarting the SQL service?
Cheers
Kannan.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would ignore posts advising you to change the recovery model or limit the size of tempDB(!).
You need to track down the actual cause of the growth.
If you have the default trace turned on (it’s on by default, out of the box), you can retrospectively find out what caused the growth by running this:
Otherwise, you can start a SQL Profiler trace to capture these events. Turn on capturing of Auto Growth events, Sort Warnings and Join Warnings and look for cross joins, hash joins or missing join conditions.
SQL Server exposes a way to identify tempDB space allocations by currently executing queries, using DMVs:
(Ref.)