MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
To identify potentially corrupt pages, you can use the following command, Choose one
A
DBCC CHECKDB
B
DB0 CHECKDB
C
DB-OWNER CHECKDB
D
None of the above
Explanation: 

Detailed explanation-1: -Checks the logical and physical integrity of all the objects in the specified database by performing the following operations: Runs DBCC CHECKALLOC on the database. Runs DBCC CHECKTABLE on every table and view in the database. Runs DBCC CHECKCATALOG on the database.

Detailed explanation-2: -If it isn’t possible to restore from a backup, CHECKDB has a feature to repair errors. If system level problems such as hardware or file system are causing data corruption, these problems must be addressed before the restoration or repair.

Detailed explanation-3: -Running DBCC CHECKDB regularly to check for database integrity is crucial for detecting database corruption in SQL Server. If it finds corruption, it will return consistency errors along with an error message showing complete details why database corruption in SQL Server occurred.

Detailed explanation-4: -Click on the New Query option. Type “DBCC CHECKDB” in the New Query dialog. Click on the “Execute” button on the toolbar to run the query. When and if the query completes successfully, you will get a status on the bottom of the query dialog.

There is 1 question to complete.