PrepAway - Latest Free Exam Questions & Answers

You have a database named DB1.

You have a database named DB1.

You discover that DB1 is corrupt.

You run DBCC CHECKDB and receive an error message within a few seconds. No pages are listed in the error message.

You need to repair the database corruption as quickly as possible. The solution must minimize data loss.

What should you do?

A. Run DBCC CHECKDB (-db1-, REPAIR_ALLOW_DATA_LOSS).

B. Run DBCC CHECKDB (-db1-, REPAIR_FAST).

C. Delete the transaction logs and restart the Microsoft SQL Server instance.

D. Run DBCC CHECKDB (-db1-, REPAIR_REBUILD).

E. Restore the database from a backup.

Explanation:

REPAIR_REBUILD

Performs repairs that have no possibility of data loss. This can include quick repairs, such as repairing missing rows in non-clustered indexes, and more time-consuming repairs, such as rebuilding an index.

Incorrect Answers:

A: The REPAIR_ALLOW_DATA_LOSS option is a supported feature but it may not always be the best option for bringing a database to a physically consistent state. If successful, the REPAIR_ALLOW_DATA_LOSS option may result in some data loss. In fact, it may result in more data lost than if a user were to restore the database from the last known good backup.

B: REPAIR_FAST

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

E: Restoring from backup is not the fastest solution.

References: https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql


Leave a Reply