exam questions

Exam 70-765 All Questions

View all questions & answers for the 70-765 exam

Exam 70-765 topic 3 question 99 discussion

Actual exam question from Microsoft's 70-765
Question #: 99
Topic #: 3
[All 70-765 Questions]

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.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Expalantion:

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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MelKr
Highly Voted 4 years, 7 months ago
If DBCC command finishes after a couple of seconds then DBCC command itself runs into an error and no repair is possible. Therefore, "Restore from Backup" is the only possible solution.
upvoted 6 times
...
McFlyBR
Most Recent 3 years, 11 months ago
Unbelievable, and I bought access for 365 days in this test, lol. The answer is clearly D, because it does not inform if it has a backup, and even if it does, the time is not known due to the size of the base (which it does not inform in the question)
upvoted 1 times
...
StillConfused
4 years ago
I pretty sure the answer is E, restore from backup, official line is you're only supposed to use DBCC Repairs as a last resort when you *don't* have a backup. https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql?view=sql-server-ver15#resolving-errors
upvoted 1 times
...
Frald
4 years ago
I believe its D. 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.
upvoted 2 times
...
Cococo
4 years, 1 month ago
Resolving Errors If any errors are reported by DBCC CHECKDB, we recommend restoring the database from the database backup instead of running REPAIR with one of the REPAIR options. https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql?view=sql-server-ver15
upvoted 2 times
...
Mbah
4 years, 8 months ago
I don't understand why answer C is chosen instead of D?
upvoted 1 times
...
AlexandreVM
5 years, 7 months ago
Really?
upvoted 3 times
STH
5 years, 3 months ago
Woaw. Such an ugly option xD I guess since with REPAIR_FAST no repair actions are performed (according to msdn doc), the only solution is REPAIR_REBUILD
upvoted 6 times
...
KC
4 years, 5 months ago
There’s no way C is correct
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago