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

Q 1 - Collection of one or more DASD volumes creates a storage group. What is the maximum limit of DASD which can be used for a storage group?

A - 125

B - 200

C - 133

D - 123

Answer : C

Explanation

This is self explanatory.

Q 2 - Which of the following can refer to both local as well as remote tables?

A - Synonyms

B - Alias

C - Both A & B

D - None of these

Answer : B

Explanation

Alias can refer to both local as well as remote tables whereas synonyms refers only to local tables.

Q 3 - What is not a valid DB2 data type?

A - Char

B - Alphanumeric

C - Varchar

D - Integer

Answer : B

Explanation

Alphanumeric is a COBOL data type. We do not use this while creating DB2 objects.

Q 4 - What does a negative SQL code indicates?

A - Exception

B - Failure

C - Success

D - None of these

Answer : B

Explanation

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

Answer : D

Explanation

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

Q 6 - Suppose we added a new column by using ALTER statement, where the column will be added?

A - Starting of the table

B - End of the table

C - Middle of the table

D - None of these

Answer : B

Explanation

When we use ALTER statement for adding a new column then it will be added at the end of the table.

Q 7 - Which utility is used to restore the table space?

A - RUNSTATS

B - REORG

C - RECOVER

D - COPY

Answer : C

Explanation

Recover utility is used to restore the table space.

Q 8 - When a table is dropped all the alias get dropped automatically. State whether true or false?

A - False

B - True

Answer : A

Explanation

This statement is incorrect. Synonyms get dropped automatically when we drop the table but alias of the table remains there. We need to manually drop the alias.

Q 9 - Fetch statement identifies the cursor and puts the value in INTO clause. A Fetch statement is coded in loop as we get one row at a time. 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