Rapair_fast | Repair_Rebuild

Chirag Sachdeva 261 Reputation points
2021-03-29T11:48:55.853+00:00

Hi Folk,

Can anyone please share in depth knowledge of these two repair options. I already know basic definition of them, that

repair_fast: Maintains backwards compatibility.
Repair_rebuild: fix minor error.

But need to know more.

thanks much in advance.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,495 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tom Phillips 17,511 Reputation points
    2021-03-29T13:10:28.043+00:00

    Repair_Fast does not exist. It is only there for processes which already use the syntax (which should be none).

    Repair_Rebuild attempts to repair without any data-loss.

    https://learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql?view=sql-server-ver15

    These are really options you should never do. These options are a last resort, because you cannot restore a proper backup. There is very little chance of success with Repair_Rebuild. You almost always need to restore a backup.

    No comments

  2. CathyJi-MSFT 20,656 Reputation points Microsoft Employee
    2021-03-30T06:15:14.977+00:00

    Hi @Chirag Sachdeva ,

    REPAIR_FAST
    Maintains syntax for backward compatibility only. No repair actions are performed.

    REPAIR_REBUILD
    Performs repairs that have no possibility of data loss. This can include quick repairs, such as repairing missing rows in nonclustered indexes, and more time-consuming repairs, such as rebuilding an index.
    This argument does not repair errors involving FILESTREAM data.

    Backup is very important, restore the backups is the best choice for corrupt databases. You can using the REPAIR_ALLOW_DATA_LOSS option as a last resort when you cannot restore a database from the backup. If you do not have a backup and cannot risk losing data, you can use a third part SQL repair software to repair the database without any loss in database integrity.

    For detail information about DBCC CHECKDB, MS document DBCC CHECKDB (Transact-SQL) is the best choice.


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.

    No comments