Can dbcc shrinkdatabase be performed anytime and will this lead to
blocking,etc. ?There's absolutely no need to run this in single user mode or backup your
master database. The whole point of shrink is that you can run it online.
Shrink will take short term page X locks and table IX locks while it is
moving pages but should not cause any long-term blocking. It is setup so as
to always be picked as the deadlock victim, if a deadlock occurs. What you
may see is shrink itself being blocked for a long period as it will always
wait for the page locks it needs.
Regards,
Paul.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Thompson" <SteveThompson@.nomail.please> wrote in message
news:uhMAa2rWDHA.1004@.TK2MSFTNGP12.phx.gbl...
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eJ9m0srWDHA.1632@.TK2MSFTNGP11.phx.gbl...
> > Can dbcc shrinkdatabase be performed anytime and will this lead to
> > blocking,etc. ?
> >
> It might -- this operation is one I'd recommend running in single user
mode.
> Be sure to back up master and your application databases when complete.
> Steve
>
No comments:
Post a Comment