Controlling tempdb Growth

110 pts.
Tags:
SQL Server
SQL Server 2005
TempDB
I have a user running a SAS job that kicks tempdb from 8.5M to 6.6Gig in less than ten minutes.

tempdb is on the default C: partition, which is only 16G (I have no control over that ridiculous size)! I’m new at this so I’m thinking my only option is to MOVE tempdb because of the space restriction.

Is it OK to move tempdb to another drive and leave the other SYSTEM databases on C: or should I move them all? Any and ALL advice is greatly appreciated.



Software/Hardware used:
SQL Server 2005 on Windows 2003 Server
ASKED: September 11, 2009  2:22 PM
UPDATED: September 11, 2009  10:18 PM

Answer Wiki

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

You should move the tempdb to another drive which has enough space. You can move the tempdb database without issue. Moving the tempdb database is actually very easy.

<pre>ALTER DATABASE tempdb
MODIFY FILE (name=’tempdev’, filename=’D:\Path\To\Where\It\Will\Be\tempdev.mdf’)
GO
ALTER DATABASE tempdb
MODIFY FILE (name=’templog’, filename=’D:\Path\To\Where\It\Will\Be\templog.ldf’)
GO</pre>

Just change the drive letters and paths to be where you want to put the files.

After you run that (make sure that the folders are correct and exist) then restart the SQL Service. When SQL restarts the SQL Server will create the tempdb in the new location and you can delete the old files.

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following