The MSDN's article about the command "DBCC CHECKDB" explains three ways to perform a database repair in the syntax section:
- REPAIR_ALLOW_DATA_LOSS - REPAIR_FAST - REPAIR_REBUILD
But I found the following statement when I was looking for how to repair a suspect (I put in this mode doing these steps) database and I can't understand which one of the three modes is it:
DBCC CHECKDB (databaseName, repair)
I executed the statement and it works fine. I'm confused because there isn't any reference to the "repair" parameter alone without finish the word with "_allow_data_loss", "_fast" or "_rebuild".
If I try to run "DBCC CHECKDB (databaseName, repair_rebuild)" on my database in emergency status, I receive a error message saying I can't execute that level of repair while the database is in emergency status. So, I discard that "repair" alone is "repair_rebuild".
That statement is the third line in the script that I found:
- ALTER DATABASE databaseName SET EMERGENCY;
- ALTER DATABASE databaseName SET SINGLE_USER;
- DBCC CHECKDB (databaseName, repair) ALL_ERRORMSGS
- ALTER DATABASE databaseName SET MULTI_USER;
- ALTER DATABASE databaseName SET ONLINE;
If I read the output of the third statement execution I see information about the process but nothing related on the level used in the repair.
Thanks in advance,