Plans Wizard (DB2 Z/OS)

From DBArtisan
Jump to: navigation, search

Go Up to IBM DB2 for z/OS Object Wizards

A plan, also known as the application plan, is a control structure that is used to process the SQL statements DB2 encounters when it is executing those SQL statements. The Plan Wizard, really, the Bind Plan Wizard, creates the structure that is used in the bind process--the process by which the output from the SQL precompiler is converted into usable form. Some authorization checking is necessary.

To Open the Bind Plan Wizard

  1. On the Navigator/Explorer, find the database where you want to add the new bind plan.
  2. On the Plan branch, right-click and select Create.

The Bind Plan Wizard lets you set plan parameters, add packages, and set bind properties. The table below describes the options and functionality on the Bind Plan wizard:

Panel Settings and tasks

1

Plan Name

Lets you select the plan name.

Qualifier

OPTIONAL: Lets you select a qualifier, the plan creator.

Action

OPTIONAL: Lets you select an action.

Sql Rules

OPTIONAL: Determines whether you can execute a type 2 CONNECT statement to an existing SQL connection, according to DB2 rules. Lets you select DB2 or STD.

Cache Size

OPTIONAL: Lets you select or type the cachesize in bytes, the authorization cache acquired in the EDM pool for the plan. At run time, the authorization cache stores user IDs authorized to run. Consulting the cache can avoid a catalog lookup for checking authorization to run the plan.

Plan Owner

OPTIONAL: Determines the authorization ID of the owner of the plan.

Current Server

OPTIONAL: Determines the location to connect to before running the plan.

Resource Acquire

OPTIONAL: Use - Acquires table space locks only when first used by a bound application program. Allocate - Acquires all table space locks when the plan is allocated. The value has no effect on dynamic SQL statements, which always use ACQUIRE(USE).

Disconnect

OPTIONAL: Determines which remote connections to destroy during commit operations. The option applies to any application process that uses the plan and has remote connections of any type. Regardless of the value of this option, a commit operation destroys all connections in the release pending state. Explicit - Destroy only connections in the release pending state. This value allows you maximum flexibility for controlling remote connections. Automatic - Destroy all remote connections. Conditional - Destroy all remote connections unless an open cursor defined as WITH HOLD is associated with the connection.

2

Lets you select the Member Name, PDS Name (partitioned data set) and click Add to enter each member and PDS name.

3

Lets you select the Location to connect to, the Collection (location of the DBMS where the plan binds and where the description of the plan resides.) and a Package.

4

Isolation

Determines how far to isolate an application from the effects of other running applications.

Keep Dynamic

Specifies that DB2 keeps dynamic SQL statements after commit points. The application does not need to prepare an SQL statement after every commit point. DB2 keeps the dynamic SQL statement until the application process ends, a rollback operation occurs or the application executes an explicit PREPARE statement with the same statement identifier. If the prepared statement cache is active, DB2 keeps a copy of the prepared statement in the cache. If the prepared statement cache is not active, DB2 keeps only the SQL statement string past a commit point. DB2 then implicitly prepares the SQL statement if the application executes an OPEN, EXECUTE, or DESCRIBE operation for that statement.

Current Data

Determines whether to require data currency for read-only and ambiguous cursors when the isolation level of cursor stability is in effect. It also determines whether block fetching can be used for distributed, ambiguous cursors.

Degree

Determines whether to attempt to run a query using parallel processing to maximize performance. Lets you select an option.

Dynamic Rules

Determines what values apply at run time for the following dynamic SQL attributes: The authorization ID that is used to check authorization

The qualifier that is used for unqualified objects

The source for application programming options that DB2 uses to parse and semantically verify dynamic SQL statements Whether dynamic SQL statements can include GRANT, REVOKE, ALTER, CREATE, DROP, and RENAME statements

Release

Determines when to release resources that a program uses. Options are at each Commit point or Deallocate when the program terminates.

Validate

Determines whether to recheck, at run time, errors found during bind. The option has no effect if all objects and needed privileges exist. Bind - If not all objects or needed privileges exist at bind time, the wizard displays an error messages, and does not bind the package. Run - If not all objects or privileges exist at bind time, the process issues warning messages, but the bind succeeds. DB2 checks existence and authorization again at run time for SQL statements that failed those checks during bind. The checks use the authorization ID of the plan owner.

5

Explain

Obtains information about how SQL statements in the member list of the plan, are to execute, and then inserts that information into the table owner.PLAN_TABLE, where owner is the authorization ID of the owner of the plan or package. This option does not obtain information for statements that access remote objects.

Reopt(VARS)

Re-determines the access path at run time.

Prepare

Prepares dynamic SQL statements that refer to remote objects.

ImmedWrite

Immediate writes will be done for updates made to group buffer pool dependent pagesets or partitions.

Opthint

Query optimization hints are used for static SQL.

Encoding

Lets you select type of language for the package.

Path

Lets you select a path that DB2 uses to resolve unqualified user-defined distinct types, functions, and stored procedure names (in CALL statements).

Flag

Lets you select all message types or a specified subset to display: informational, warning, error, and completion messages.

6

Enable or Disable system connection types that can use the plan or package, select a System or Cname option.