23 January,2024 by Tom Collins
Question: I'm trying to delete a TempDB ndf file from the TempDB file definitions. It is no longer required ,but getting an error message :
DBCC SHRINKFILE: Page xxxxxxxx could not be moved because it is a work table page.
How can I get around this problem? There is no activity on the server
Answer: The usual fix for removing the extra tempdb file or even the extra transaction log file is defined in Msg 5042 - SQL Server DBA
But sometime that does not work if certain circumstances are in place - such as the presence of a work table page. Sometimes it is always possible to restrat the SQL Server due to approval requests not met or other Production controls
This sequence of commands may help in this situation , and avoid the TempDB restart. There may be some performance hit when you execute these commands
Releases all unused cache entries from all caches.
DBCC FREESYSTEMCACHE ('ALL');
DBCC FREEPROCCACHE;
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |