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 - Which of the following are physical objects?

A - Table space

B - Database

C - Views

D - Both A & B

Answer : D

Explanation

Database and Table space are physical objects.

Q 2 - How many clustering index we can have for a single table?

A - 15

B - 10

C - 1

D - No Limit

Answer : C

Explanation

We can have only one clustering index for a table.

Q 3 - What is the maximum size of a VARCHAR data type in DB2?

A - 256 bytes

B - 1032 bytes

C - 4046 bytes

D - 1064 bytes

Answer : C

Explanation

Varchar data type maximum size is of 4046 bytes.

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 : B

Explanation

When object is not defined and you are using it then you will see SQLCODE = -204

Q 6 - What is the input to the bind process?

A - DBRM

B - SQL

C - Table Name

D - None of these

Answer : A

Explanation

DBRM is the input to the bind process which is produced in the pre-compile step.

Q 7 - If a transaction takes a Update lock on some data, then other transactions can get what type of lock?

A - Shared

B - Update

C - Exclusive

D - Both A & B

Answer : A

Explanation

If a transaction takes an Update lock on some data, then other transactions can only get only Shared lock on it.

Q 8 - Exclusive locks are taken for INSERT, UPDATE and DELETE purposes. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 9 - Host Variables are used for receiving data from the table or inserting data to the table. Host variables must be declared for all values that are to be passed between program and DB2. State whether true or false?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Q 10 - Which component is used to processes SQL statements and selects the access paths?

A - Buffer Manager

B - Data Manager

C - DB2 Optimizer

D - None of these

Answer : C

Explanation

DB2 optimizer is used to select the access paths & to process the SQL queries.

db2_questions_answers.htm
Advertisements