October 24, 2011 at 8:08 pm
My SQL Server configuration :
2008 Standard Edition (64-bit), version 10.0.2531.0
My tempdb data file has risen to 32 GB, I have tried all of the following 3 ways (without having SQL Server service re-start), but none of them could shrink the db :
ALTER DATABASE tempdb MODIFY FILE (NAME='tempdev', SIZE=2048),
DBCC SHRINKDATABASE(tempdb, 10),
DBCC SHRINKFILE(tempdev, 2048)
Is it possible to shrink a 2008 tempdb without having service re-start or system re-boot ?
October 25, 2011 at 3:17 am
http://support.microsoft.com/kb/307487
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 25, 2011 at 4:11 am
Already read.
The ways it proposed need service re-start.
I want to get a way that doesn't need to take SQL Server service re-start.
Is it possible ?
October 25, 2011 at 4:39 am
onlo (10/25/2011)
Is it possible ?
No.
But if you find a way let me know
October 25, 2011 at 5:32 am
As it says, if you shrink TempDB while it's in use, you can get corruption errors that require a restart to fix.
I suspect the better question here is why are you shrinking TempDB at all?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 26, 2011 at 2:23 am
I agree that shrinking tempdb may not be is not a good idea.
However, you could try to issue DBCC FREESYSTEMCACHE('All') before shrinking. This flushes the system cache, including internal objects stored in tempdb.
Be aware that it could have a huge impact on performance, since it flushes everything from the cache, including query plans.
If you don't have other options, you could give this a try.
-- Gianluca Sartori
October 26, 2011 at 2:56 am
Gianluca Sartori (10/26/2011)
I agree that shrinking tempdbmay not beis not a good idea.However, you could try to issue DBCC FREESYSTEMCACHE('All') before shrinking. This flushes the system cache, including internal objects stored in tempdb.
Be aware that it could have a huge impact on performance, since it flushes everything from the cache, including query plans.
If you don't have other options, you could give this a try.
To me this says you may as well restart the instance in a safe maner
October 26, 2011 at 3:40 am
MysteryJimbo (10/26/2011)
Gianluca Sartori (10/26/2011)
I agree that shrinking tempdbmay not beis not a good idea.However, you could try to issue DBCC FREESYSTEMCACHE('All') before shrinking. This flushes the system cache, including internal objects stored in tempdb.
Be aware that it could have a huge impact on performance, since it flushes everything from the cache, including query plans.
If you don't have other options, you could give this a try.
To me this says you may as well restart the instance in a safe maner
That's not what I wrote.
-- Gianluca Sartori
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply