tempdb maxing out drive

Hi,

I have tempdb on a drive of it's own. It is setup with 3 primary files and a log file.

Lately it has maxed the drive. I shrank it once but it's done the same thing. Currently it's taking up all but 10MB on the drive but I don't want to get into a situation where I'm just shrinking it each time. What way should I deal with this?

Cheers

Paul

July 20th, 2015 4:15am

Permanent Fix, You may move the tempdb files to drive that has more storage space.


Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 4:23am

As you have your own drive for it: You shouldn't care that much and it's not necessary to shrink it.

The only problem is: The spaces is needed by some processes. This may lead under some circumstances to a full log while processing data and thus to an aborted process.

So, how often did this happen? You should identify those queries and optimize them.

July 20th, 2015 4:27am

https://www.simple-talk.com/sql/database-administration/optimizing-tempdb-configuration-with-sql-server-2012-extended-events/

http://www.brentozar.com/sql/tempdb-performance-and-configuration/

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 5:26am

Hello

To manage tempdb you can set up a scheduled task to shrink tempdb using the following code: -

Use tempDB
GO
CHECKPOINT;
GO
DBCC DROPCLEANBUFFERS;
GO
DBCC FREEPROCCACHE;
GO
DBCC FREESYSTEMCACHE ('ALL');
GO
DBCC FREESYSTEMCACHE ('ALL');
GO
DBCC SHRINKFILE (TEMPDEV, 100);   --- New file size in MB
GO
DBCC SHRINKFILE (TEMPLOG, 100);   --- New file size in MB
GO

Repeat the DBCC SHRINKFILE for all of your files.

Also look check for any bulk processes that could be the cause of the issue e.g. bulk deletes, inserts, are there any Cubes; Report Subscriptions etc?

Also introduce additional volumes and spread your tempdb files over these volumes.

July 20th, 2015 6:03am

Such task will be a performance killer for this environment.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 7:21am

I'd first try to determine what's causing it to grow --most likely an index rebuild which uses tempdb.   I agree with the others --shrinking it is really a waste of time --you're claiming the space because you need the space.   You need to figure out why and then determine how to proceed.
July 20th, 2015 7:25am

Also; is there a new production Database on the Server?  Perhaps the processes on this Database are the cause of the issue?  Is general SQL Server performance also degraded?
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 8:33am

Hi,

I have tempdb on a drive of it's own. It is setup with 3 primary files and a log file.

Lately it has maxed the drive. I shrank it once but it's done the same thing. Currently it's taking up all but 10MB on the drive but I don't want to get into a situation where I'm just shrinking it each time. What way should I deal with this?

Cheers

Paul

Please make habit to read books online Microsoft has written about such issues

https://technet.microsoft.com/en-us/library/ms176029%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396

July 21st, 2015 12:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics