Use sp_iqcheckdb dropleaks to repair database allocation problems.
After allocation problems are repaired, allocation statistics appear in the DBCC output with no errors.
DBCC displays an Allocation Summary section at the top of the report, which lists information about allocation usage. The Allocation Statistics section provides more details about the blocks. The DBCC output does not contain repair messages for the leaked blocks that have been recovered.
sp_iqcheckdb 'dropleaks dbspace mydbspace'; checkpoint;The sp_iqcheckdb output indicates no errors, so the checkpoint is executed.
DBCC reports statistics that do not show in this abbreviated output.
Stat Value Flags ==============================|===================================|===== DBCC Allocation Mode Report | | ==============================|===================================|===== DBCC Status |Freelist Updated | DBCC Status |No Errors Detected | DBCC Work units Dispatched |75 | DBCC Work units Completed |75 | ==============================|===================================|===== Allocation Summary | | ==============================|===================================|===== Blocks Total |8192 | Blocks in Current Version |4594 | Blocks in All Versions |4594 | Blocks in Use |4610 | % Blocks in Use |56 | ==============================|===================================|===== Allocation Statistics | | ==============================|===================================|===== DB Extent Count |1 | Marked Logical Blocks |8176 | Marked Physical Blocks |4594 | Marked Pages |511 | Blocks in Freelist |126177 | Imaginary Blocks |121567 | Highest PBN in Use |5425 | Total Free Blocks |3582 | Usable Free Blocks |3507 | % Free Space Fragmented |2 | Max Blocks Per Page |16 | 1 Block Page Count |103 | 3 Block Page Count |153 | ... 16 Block Hole Count |213 | ==============================|===================================|=====
start_iq -n my_db_server -x 'tcpip{port=7934}' -gd dba my_db /work/database/my_db.db