DB2 Online Quiz


Advertisements

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

Answer : B

Explanation

System services component handles DB2 startup and shutdown.

Q 2 - Which table space can have one or more tables and can have rows from multiple tables on a single page?

A - Simple Table space

B - Segmented Table space

C - Partitioned Table space

D - None of these

Answer : A

Explanation

A simple table space can contain one or more tables and there is no limit on the number of tables. Rows from multiple tables can be on a single page.

Q 3 - Which index must be present for partitioned table space?

A - Unique Index

B - Clustered Index

C - Non-Unique Index

D - All of these

Answer : B

Explanation

A partitioned table space must have a clustered index.

Q 4 - What does a positive SQL code indicates?

A - Exception

B - Failure

C - Success

D - None of these

Answer : A

Explanation

A negative SQL code indicates a failure while a positive one indicates an exception.

Q 5 - In a COBOL-DB2 program where can we declare a cursor?

A - Working Storage Section

B - Procedure Division

C - Linkage Section

D - Both A & B

Answer : D

Explanation

We can declare a cursor either i Working Storage Section or in Procedure Division also.

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 Shared lock on some data, then other transactions can get what type of lock?

A - Shared

B - Update

C - Exclusive

D - Both A & B

Answer : D

Explanation

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

Q 8 - Can we add columns to add table after defining it?

A - No

B - Yes

Answer : B

Explanation

Yes we can add columns after table declaration by using ALTER statement.

Q 9 - Embedded SQL statements works like normal SQL statements with some minor changes like output of query is directed to pre-defined set of variables which are referred as Host Variables. State whether true or false?

A - False

B - True

Answer : B

Explanation

This statement is correct.

Q 10 - What is the physical storage length of TIMESTAMP data type?

A - 4 bytes

B - 3 bytes

C - 10 bytes

D - 20 bytes

Answer : C

Explanation

TIMESTAMP data type takes 10 bytes and default is YYYY-MM-DD:HH:MM:SS-NNNNNN

db2_questions_answers.htm
Advertisements