Tuesday, November 29, 2011

BIND:


           BIND takes DBRM as input & generate package & application plan.  The package will be loaded to the directory. Plan will be loaded to sysplans.

Bind functions:

Ø  Checks authorization for SQL statement
Ø  Checks the syntax errors of SQL statements like
1.      Missing co name in the select list & used in order by & group by
2.      Mismatch columns host variables
3.      Data type mismatch of columns & host variables
4.      Indicator variables not declared
5.      Data truncation.

BIND SUBCOMPONANTS/PARAMETERS:

  1. OPTIMIZER:
Ø  It generates optimized access path by analyzing the statistics of SQL statements which will be stored.
Ø  RUNSTATS utility is one of the ISPF panel option which is stored in DB2 defaults option.
Ø  Optimized path is stored in package which is not executable module.

  1. ISOLATION LEVEL:
Which can be used to lock the database at the time of executing SQL statements.

Cusrsor stability(CS):  It acquires the address of a row.  Sets the pointer to a specified row based on SQL query & acquires the lock against that row.  Then releases the klock after the transaction before commit.

Repeatable Read(RR):   which acquires the address of a row & acquire lock against the page(1 page -4024 bytes) & then released the lock after the commit statements.

Default is RR.

  1. RUNTIME SUPERVISOR:
Which is to oversee execution of SQL statements.
Statistics like no of tables, columns, indexes, keys

  1. PLAN/APPLICATION PLAN:
It consists of executable module which is actual output of SQL statements which must be specified in the RUNJCL to execute SQL queries if the program is batch program. If the program is online which must be specified in RCT.  Application plan will be loaded to load module with time stamp tokens.

No comments:

Post a Comment