|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, March 20, 2013 6:25 AM
Points: 363,
Visits: 416
|
|
In one of our servers tempdb is grown to 75 gb. If we check properties of tempdb it is showing 73 gb free, but when we try to shrink tempdb it is giving below given error.... Has anybody faced similar issue and resolved..
Msg 5054, Level 16, State 1, Line 1 Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:05 AM
Points: 4,428,
Visits: 7,207
|
|
Have a look at this, and take notice of what it says in the section towards the end. Your safest bet is to restart the instance.
John
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Today @ 5:03 PM
Points: 220,
Visits: 703
|
|
| Restart the engine tempdb drop and recreate it self
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, March 20, 2013 6:25 AM
Points: 363,
Visits: 416
|
|
Thanks John...
We I have already tried dbcc shrinkdatabase and shrinkfile and both are giving same error. This being our production server we are looking alternatives without restarting SQL service.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 5:04 AM
Points: 323,
Visits: 966
|
|
nitin.doshi (11/20/2012) In one of our servers tempdb is grown to 75 gb. If we check properties of tempdb it is showing 73 gb free, but when we try to shrink tempdb it is giving below given error.... Has anybody faced similar issue and resolved..
Msg 5054, Level 16, State 1, Line 1 Could not cleanup worktable IAM chains to allow shrink or remove file operation. Please try again when tempdb is idle. DBCC execution completed. If DBCC printed error messages, contact your system administrator.
what is log file size of tempdb out of 75 GB
----------------------------------------------------------------------------- संकेत कोकणे
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, March 20, 2013 6:25 AM
Points: 363,
Visits: 416
|
|
| 75 GB is purely data file and size of log is 3.5 gb
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
can you post here, your databases configurations (their size ) ? additionally also check if there are any open transactions or not ? tempdb handles alot of stuff like temp table .temp valriable .order by grout by ..work table . index rebuils (sort in temp db ) etc etc etc .. so its natural that it grew upto its limits
-------Bhuvnesh---------- While 1 = 1 (Learning SQL....) Click to get fast response of your post
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Yesterday @ 7:29 AM
Points: 765,
Visits: 328
|
|
If you are trying to run a shrink on the tempdb you must be in single user mode and ensure no other activity is occurring in the tempdb database. If there is any activity on the tempdb then the DBCC SHRINKFILE and DBCC SHRINKDATABASE Commands shall fail.
If you are doing this you must ensure that you follow the recommendations from Microsoft located at http://support.microsoft.com/kb/307487
There is also a support article for SQL Server 2008 which states the same as the above support article, but I don't have it to hand
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:28 PM
Points: 37,730,
Visits: 29,996
|
|
nitin.doshi (11/20/2012) This being our production server we are looking alternatives without restarting SQL service.
Leave it as is?
If tempDB grew that size, then, unless there was some unusual activity, it suggests that TempDB needs to be that size and perhaps the initial size for the DB should be set closer to what it currently is.
As per the kb article posted earlier, shrinking an in-use TempDB can cause corruptions that will force a restart. The only safe way to shrink TempDB is to completely quiesce the server (no activity of any form), that usually means a restart.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Yesterday @ 7:29 AM
Points: 765,
Visits: 328
|
|
You also need to understand what is using tempdb. Shrinking the file may sort the problem sort term but does not mean this shall not happen again
SELECT TOP 10 session_id, database_id, user_objects_alloc_page_count + internal_objects_alloc_page_count / 129 AS tempdb_usage_MB FROM sys.dm_db_session_space_usage ORDER BY user_objects_alloc_page_count + internal_objects_alloc_page_count DESC;
The above query shall tell what is using tempdb.
|
|
|
|