DB2 Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to DB2. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Can a DB2 system have more than one databases?

A - No

B - Yes

Answer : B

Explanation

Yes, a DB2 system can have more than one database.

Q 2 - Which table space is divided into segments of 4 to 64 pages in increments of 4 and each segment holds data for only one table?

A - Simple Table space

B - Segmented Table space

C - Partitioned Table space

D - None of these

Answer : B

Explanation

Segmented table space is divided into segments of equal size and segments are of 4 to 64 pages size in increments of 4 pages. It can have one or more tables. Each segment is dedicated to a table and a table can occupy multiple segments.

Q 3 - In which statement you can define primary key?

A - CREATE TABLE

B - ALTER TABLE

C - UPDATE TABLE

D - Both A & B

Answer : D

Explanation

Primary keys are optional and we can define them in CRETAE TABLE & ALTER TABLE statements.

Q 4 - Which statement is used to revoke the access from a database?

A - REJECT

B - REVERT

C - REVOKE

D - None of these

Answer : C

Explanation

REVOKE statement is used to take away the permissions from a Database.

Answer : D

Explanation

SQLCODE -818 is a timestamp mismatch of load module and bind timestamp built from DBRM.

Q 6 - Which utility reclaims space from pages when some rows were deleted?

A - RUNSTATS

B - REORG

C - RECOVER

D - COPY

Answer : B

Explanation

Reorg utility is used for reorganization of data on physical storage.

Q 7 - Which command is use to drop an existing plan?

A - DROP

B - FREE

C - DELETE

D - None of these

Answer : B

Explanation

FREE command is used to drop an existing plan.

Q 8 - Locking is a process that is used to ensure data integrity and prevents concurrent users from accessing inconsistent data. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 9 - In a COBOL-DB2 program, all the SQL statements must be delimited between EXEC SQL and END-EXEC. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 10 - What SQLCODE you will get for a successful execution of query?

A - 100

B - 0

C - -100

D - Blank

Answer : B

Explanation

You will get SQLCODE = 0 if the execution is successful.

db2_questions_answers.htm
Advertisements