Tempdb Size increases and acquires the complete disk space

5 pts.
Disk space
The issue goes as follows, Tempdb size generally remains around 3GB. One day it starts increasing and acquires the whole of the empty disk space of 29 GB within 15 hours. How can we avoid such kind of situations from happening in future? Any specific reason for such thing to happen? Also the .LDF file is as of now (after restart of SQL Service and tempdb size around 2.5 GB) is around 1.4 GB though the RECOVERY model is set to SIMPLE. Why is it so ? Early reply would be helpful. Thanks in advance, Regards Manuni

Answer Wiki

Thanks. We'll let you know when a new response is added.

Make sure that TempDB is set to autogrow and do not set a maximum size for TempDB. If the current drive is too full to allow autogrow events, then arrange a bigger drive, or add files to TempDB on another device (using ALTER DATABASE as described below and allow those files to autogrow.

Move TempDB from one drive to another drive. There are major two reasons why TempDB needs to move from one drive to other drive.
1) TempDB grows big and the existing drive does not have enough space.
2) Moving TempDB to another file group which is on different physical drive helps to improve database disk read, as they can be read simultaneously.

Follow direction below exactly to move database and log from one drive (c:) to another drive (d:) and (e:).

Open Query Analyzer and connect to your server. Run this script to get the names of the files used for TempDB.
EXEC sp_helpfile

Results will be something like:
name fileid filename filegroup size
——- —— ————————————————————– ———- ——-
tempdev 1 C:Program FilesMicrosoft SQL ServerMSSQLdatatempdb.mdf PRIMARY 16000 KB
templog 2 C:Program FilesMicrosoft SQL ServerMSSQLdatatemplog.ldf NULL 1024 KB
along with other information related to the database. The names of the files are usually tempdev and demplog by default. These names will be used in next statement. Run following code, to move mdf and ldf files.

If the log file also the same position take the log backup it will reduce the size of the log file. Don’t increase the log file size

Discuss This Question:  

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: