DBCC CHECKALLOC - Check the consistency of disk space allocation.

Syntax
      DBCC CHECKALLOC [ ( 'database' | database_id | 0 
         [ , NOINDEX  | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]
         [WITH 
          { [ ALL_ERRORMSGS ]
                   [ , NO_INFOMSGS ]
                   [ , TABLOCK ]
                   [ , ESTIMATEONLY ] 
          }
        ]
    ]

 Key:
   REPAIR_FAST | REPAIR_REBUILD | NOINDEX - deprecated options
   REPAIR_ALLOW_DATA_LOSS - Use only as a last resort
                          - back up the database before you run this option.

To find the repair level to use run DBCC CHECKDB without a repair option. The best and easiest way to repair errors is to restore from a backup.

Examples

-- Check disk space allocation for the current database.
DBCC CHECKALLOC;
GO

"Millions of individuals making their own decisions in the market-place will always allocate resources better than any centralized government planning process" ~ Ronald W. Reagan

Related commands

DBCC CHECKDB - Check allocation, and integrity of all objects.

Equivalent Oracle commands:

ALTER TABLE MODIFY CONSTRAINT VALIDATE
DBMS_REPAIR


 
Copyright © 1999-2024 SS64.com
Some rights reserved