Share via


Database Repair Constants (SQLDMO_DBCC_REPAIR_TYPE)

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Database repair constants control behavior of the CheckTables and CheckAllocations methods of the Database object.

Constant

Value

Description

SQLDMORepair_Allow_DataLoss

3

Attempts all database repair, regardless of the possibility of data loss. For example, corrupted text objects are deleted.

SQLDMORepair_Fast

1

Attempts database repair tasks that do not incur data loss.

SQLDMORepair_None

0

Does not attempt database repair on database inconsistencies encountered.

SQLDMORepair_Rebuild

2

Attempts database repair tasks that do not incur data loss. Indexes are rebuilt if the database is successfully repaired.