18 November,2012 by Jack Vamvas
When observing a DBCC DHRINKDATABASE on the DMV sys.dm_exec_requests command column , you’ll notice different commands appearing.
Step 1 – DbccSpaceReclaim - Prepares for data moves by cleaning up space –e.g deferred allocations and manage empty extents
Step 2 – DbccFileCompact - Adjusting pages beyond the target to before the target.
Step 3 – DbccLOBCompact - LOB data compact
Sometimes it may appear the command is taking a long time. Some reasons may be:
1) If a heap is moved all Non Clustered index physical link references to a record number on a data page need to be updated. If there are large NonClustered Indexes , the Query Processor needs to process all the updates.
2) Analyse for other processes blocking the lock required to move the page SQL Server – Current queries executing on SQL Server
3) Analyse IO subsystem
SQL Server – How to Predict the DBCC SHRINKDATABASE finish time
SQL Server - Monitoring a Rollback and sys.dm_exec_requests ...
SQL Server Storage and IO performance - SQL Server DBA
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: |