question

ChiragSachdeva-6150 avatar image
0 Votes"
ChiragSachdeva-6150 asked Cathyji-msft commented

Rapair_fast | Repair_Rebuild

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-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ChiragSachdeva-6150,

We have not received a response from you. Did the replies could help you? If the response helped, do "Accept Answer". If it is not, please let us know. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered

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://docs.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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @ChiragSachdeva-6150,

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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.