Controlling tempdb Growth
65 pts.
0
Q:
Controlling tempdb Growth
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: Sep 11 2009  2:22 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
46795 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button
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.

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


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.
Last Answered: Sep 11 2009  10:18 PM GMT by Mrdenny   46795 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0