DBCC CHECKDB
dbcc checkdb ('neogeoin1_serv')
checkt eine DB
wenn fehler auftreten kann man mit folgenden commands reparieren:
dbcc checkdb ('neogeoin1_serv',repair_fast)
dbcc checkdb ('neogeoin1_serv',repair_rebuild)
dbcc checkdb ('neogeoin1_serv',repair_allow_data_loss)
| Value |
Description |
| REPAIR_ALLOW_DATA_LOSS |
Performs all repairs done by REPAIR_REBUILD and includes allocation and deallocation of rows and pages for correcting allocation errors, structural row or page errors, and deletion of corrupted text objects. These repairs can result in some data loss. The repair may be done under a user transaction to allow the user to roll back the changes made. If repairs are rolled back, the database will still contain errors and should be restored from a backup. If a repair for an error has been skipped due to the provided repair level, any repairs that depend on the repair are also skipped. After repairs are completed, back up the database. |
| REPAIR_FAST |
Performs minor, nontime-consuming repair actions such as repairing extra keys in nonclustered indexes. These repairs can be done quickly and without risk of data loss. |
| REPAIR_REBUILD |
Performs all repairs done by REPAIR_FAST and includes time-consuming repairs such as rebuilding indexes. These repairs can be done without risk of data loss. |
also erst fast, dann rebuild, dann allow_data_loss
vorher muss die DB auf single user gesetzt werden, hinterher wieder zurück (FALSE)
EXEC sp_dboption 'neogeoin1_serv', 'single user', 'TRUE'