- DB2 Tutorial
- Home
- DB2 - Introduction
- DB2 - Server Installation
- DB2 - Instance
- DB2 - Databases
- DB2 - Bufferpools
- DB2 - Tablespaces
- DB2 - Storagegroups
- DB2 - Schemas
- DB2 - Data Types
- DB2 - Tables
- DB2 - Alias
- DB2 - Constraints
- DB2 - Indexes
- DB2 - Triggers
- DB2 - Sequences
- DB2 - Views
- DB2 with XML
- DB2 - Backup and Recovery
- DB2 - Database Security
- DB2 - Roles
- DB2 - LDAP
- DB2 Useful Resources
- DB2 - Questions and Answers
- DB2 - Quick Guide
- DB2 - Useful Resources
- DB2 - Discussion
DB2 Mock Test
This section presents you various set of Mock Tests related to DB2. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
DB2 Mock Test III
Q 1 - Suppose we added a new column by using ALTER statement, where the column will be added?
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 2 - How you will count the number of rows from a table TAB?
Answer : C
Explanation
This is self explanatory.
Answer : A
Explanation
DBRM is the input to the bind process which is produced in the pre-compile step.
Q 4 - If a transaction has an exclusive lock on some data, then what are the other types of lock which can be applied on it?
Answer : C
Explanation
A transaction gets an Exclusive lock when it is about to write at that time no other lock can be applied on it.
Q 5 - Which isolation level ensures highest data integrity?
Answer : A
Explanation
Repeatable Read ensures highest data integrity as it holds page and lock the rows until a COMMIT point.
Q 6 - In which isolation level phantom rows can occur?
Answer : B
Explanation
In this isolation level other programs can INSERT new data so we can get phantom rows.
Q 7 - Which isolation level provides maximum concurrency?
Answer : D
Explanation
Uncommitted read provides maximum concurrency.
Q 8 - Which command is used to commit a transaction in CICS program?
Answer : B
Explanation
SYNCPOINT is used to commit a transaction in CICS program.
Q 9 - Which utility provides statistical information such as the number of pages and rows and stores them in Catalog tables?
Answer : A
Explanation
Runstats utility updated the catalog tables with the statistical information.
Q 10 - Which utility reclaims space from pages when some rows were deleted?
Answer : B
Explanation
Reorg utility is used for reorganization of data on physical storage.
Q 11 - Which utility is used to restore the table space?
Answer : C
Explanation
Recover utility is used to restore the table space.
Q 12 - Which utility is take the backup of table spaces and index spaces?
Answer : D
Explanation
Copy utility is used to take the back up of table spaces and index spaces.
Q 13 - Which utility is used to load data into a table from a sequential file?
Answer : D
Explanation
Load utility is used to load data into tables.
Answer : D
Explanation
Locks can be classified based on size, duration and mode.
Q 15 - If a transaction takes a Shared lock on some data, then other transactions can get what type of lock?
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 16 - If a transaction takes a Update lock on some data, then other transactions can get what type of lock?
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 17 - What action DB2 takes when a program abends?
Answer : A
Explanation
When a program abends in middle of some transaction then DB2 performs a auto rollback.
Q 18 - What action DB2 takes when a program executes successfully?
Answer : B
Explanation
When a program executes successfully it does an auto commit.
Q 19 - Which command is use to drop an existing plan?
Answer : B
Explanation
FREE command is used to drop an existing plan.
Q 20 - When a table is dropped all the synonyms get dropped automatically. State whether true or false?
Answer : B
Explanation
Synonyms get dropped automatically when we drop the table but alias of the table remains there.
Q 21 - When a table is dropped all the alias get dropped automatically. State whether true or false?
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 22 - Log files consist of error logs, which are used to recover from application errors. The logs keep the record of changes in the database. State whether true or false?
Answer : B
Explanation
This is self explanatory.
Q 23 - One tablespace is associated with one bufferpool. The size of bufferpool and tablespace must be same. State whether true or false?
Answer : B
Explanation
This is self explanatory.
Answer : B
Explanation
Yes we can add columns after table declaration by using ALTER statement.
Q 25 - Static SQL is compiled and optimized prior to its execution where as dynamic SQL is compiled and optimized during execution. State whether true or false?
Answer : B
Explanation
This is self explanatory.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | B |
2 | C |
3 | A |
4 | C |
5 | A |
6 | B |
7 | D |
8 | B |
9 | A |
10 | B |
11 | C |
12 | D |
13 | D |
14 | D |
15 | D |
16 | A |
17 | A |
18 | B |
19 | B |
20 | B |
21 | A |
22 | B |
23 | B |
24 | B |
25 | B |
To Continue Learning Please Login
Login with Google