SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


shrink fails with error - File ID of database ID cannot be shrunk as it is either being shrunk by...


shrink fails with error - File ID of database ID cannot be shrunk as it is either being shrunk by another process or is empty

Author
Message
Deb Anderson
Deb Anderson
SSC Veteran
SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)

Group: General Forum Members
Points: 234 Visits: 351
This is an fyi (no response necessary).

I got this error and researched it and found no good answer for how to deal with it:

"File ID 5 of database ID 8 cannot be shrunk as it is either being shrunk by another process or is empty"

One post suggested that it was a memory issue, but it also suggested the only way to deal with it was to restart SQL. I don't have that luxury, so I cleared my cache and reran the shrink and the shrink worked.

DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE


Thanks, Deb

Cool
noeld
noeld
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

Group: General Forum Members
Points: 9820 Visits: 2048
If Autoshrink is "ON" and you tried to run a "dbcc shrinkfile" you could get that message.


* Noel
Paul Storm-444906
Paul Storm-444906
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 161
See the Connect bug "DBCC SHRINKFILE and SHRINKDATABASE failing after backup" at
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=291408
Ted Henderson
Ted Henderson
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 187
One more thing to try that worked for me when I received this error message. I just increased the data file by a few MB and then tryed to do the Shrink again. It worked fine. It seems like adding a few MB to the data file resets an internal counter or switch that tells it it's not in the middle of a shrink now.
CoetzeeW
CoetzeeW
SSC-Enthusiastic
SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 Visits: 161
thanks Ted, it worked for me as well....now to find out who is growing my tempdb 1 AM in the morning to rediculas sizes ..



Sunny1
Sunny1
SSC Journeyman
SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)

Group: General Forum Members
Points: 91 Visits: 745
Thanks Ted. It works for me, too.:-)
mbricker-600840
mbricker-600840
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3579 Visits: 2410
Whatta guy, Ted. Bailed me out also.

Mike

“I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant.”...Robert McCloskey

___________________________________________________________________
bhat.manjunath7
bhat.manjunath7
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 213
Thanks A lot Ted. This worked for me:-).

Regards,
Manjunath C Bhat,
www.manjunathcbhat.in

Thanks & Regards,
Manjunath C Bhat,
http://manjunathcbhat.blogspot.com,
http://manjunathcbhat.wordpress.com
Vegard Hagen
Vegard Hagen
SSChasing Mays
SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)SSChasing Mays (617 reputation)

Group: General Forum Members
Points: 617 Visits: 387
More often than not, the best thing to do is to not shrink at all though.



Vegard Hagen
Norwegian DBA, blogger and generally a nice guy who believes the world is big enough for all of us.

@vegard_hagen on Twitter
Blog: Vegard's corner (No actual SQL stuff here - haven't found my niche yet. Maybe some day...)

"It is better to light a candle than to curse the darkness."
(Chinese proverb)


anne.johansen
anne.johansen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 32
Thanks Ted - helped me too!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search