can any body explain about plan and pakage in detail....
Answers were Sorted based on User's Feedback
Answer / ashish kumar
A DB2 bind is a process that builds an access path to DB2
tables.
A BIND process establishes a relationship between an APPLICATION
PROGRAM and its RELATIONAL DATA.
A plan is an executable module containing the access path logic
produced by the Db2 optimizer. It can be composed of one or
more DBRMs and packages.
The plans are available in the Catalog table SYSIBM.SYSPLAN
DB2 Bind compiles all your sql statements(dbrm) into an
executable format.
It uses DB2 Optimizer to create the better access path.
Package is the executable access path code for the sql
statements in the DBRM
Plan contains package list which is nothing but pointers to
packages.
| Is This Answer Correct ? | 13 Yes | 0 No |
A package is single bound DBRM with optimized access paths.
It contains location identifier, collection Identifier and
package identifier.
A package can have multiple versions, each with it's own
version identifier
Advantages of Packages,
Reduce the Bind Time.
Versioning.
Can provide BIND options at programmer level.
As Ashish mentioned above, Plan contains packages list which
is nothing but Pointers. whenever you are doing changes in
SQL staetments related to particular DBRM . Then only that
particular Packages needs to be rebind not the Plan. This is
similar to recompiling a sub program not the main program.
| Is This Answer Correct ? | 4 Yes | 0 No |
Is it Possible to declare or create a cursor for UPDATE of table? If yes tell me how? If no Tell me why?
In BIND, isolation level parameter specifies the duration of page lock and ACQUIRE, RELEASE also do almost the same thing. What is the exact difference between the two? Do they work in conjunction while executing SQL queries and obtaining locks?
I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?
What is ALTER ?
if one db2 pgm calls another db2 pgm. how many plans do we need. what r the steps involved..
What is sqlcode -811?
7 Answers Accenture, CTS, TCS,
How do you check for a null value in a db2 column?
How can record locking be achieved in those DB2 versions which do not support it?
What is PRIME TABLE and what are the uses of it
What is schema in db2?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
If the main program has only cobol statements and subprogram has the db2 statements what is the procedure for precompilation. for which program we need to do the precompilation