DB2 Package and Plan Questions
- What is the difference between a package and a plan?
How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?
Answer: Package and plan are usually used synonomously, as in this site.
Both contain optimized code for SQL statements - a package for a single program, module or subroutine contained in the datebase request module (DBRM) library.
A plan may contain multiple packages and pointers to packages. The one CICS module would then exist in a package that could be referenced in two different plans.
- cWhat is an asychronous write?
Answer: It is a write to disk that may occur before or long after a commit.
The write is controlled by the buffer manager.
- Question : What is a lock?
Answer: A lock is the mechanism that controls access to data pages and tablespaces.
- What is meant by isolation level?
Answer: This is a key concept for any relational database. Isolation level is the manner in which locks are applied and released during a transaction.
For DB@ a repeatable read holds all locks untile the transaction completes or a syncpoint is issued. For transactions using 'cursor stability' the page lock releases are issued as the cursor 'moves', i.e. as the transaction
releases addressability to the records.
- What are leaf pages?
Answer: They are the opposite of root pages.
Leaf pages are the lowest level index pages - the pages that contain index entries and information to the corresponding table rows.
- What is a precompiler?
Answer: It is a DB2 facility for static SQL statements - it replaces these statements with calls to the DB2 language interface module.
- What is a root page?
Answer: The opposite of a leaf page; it is the highest level index page.
An index can contain only the one root page; all other index pages are associated to the root.
- What is a thread?
Answer: A thread is the connection between DB2 and some other subsystem, such as CICS or IMS/DC.