Describing Db2 packages


Use the Describe views to display details about all statements in a Db2 package. The Describe views display the following information:

  • Statement number for all statements
  • Statement text for all statements
  • Message severity for explainable statements
  • If you bound the package with Explain set to YES or ONLY:
    • Explain cost
    • Explain timestamp
    • Explain plan translation

You can also start an SQL Tuning session for a statement in the package.

To describe Db2 packages

  1. Select the DB2 Navigator perspective.
  2. Open or create an object view for packages.
  3. Select up to five objects from the packages list and click Describe NW_describe_package.png.

    Alternatively, you can right-click the selected objects and select Describe.

    The Describe summary view is displayed in the Performance perspective.

    describe_summary_view_callout_spe2005.png

    Legend

    #

    Description

    Details

    1

    View report

    Displays the Describe output in a Report dialog box

    To save the output to disk, in the Report dialog, click Save output text NW_floppy.png.

    2

    Statement details

    Displays the following information for each statement:

    • Package name
    • Statement number
    • Statement text
    • Cost
    • Explain (YES) details
    • Explain (ONLY) details

    3

    Sort options

    Select how to sort the statements from the following options:

    • Default sort
    • Sort by Cost
    • Sort by Severity

    4

    Performance perspective options

    Displays the Performance perspective options. For more information, see Setting-SQL-tuning-options.

    5

    Message severity indicator

    Indicates the highest severity of the message rules associated with the statement (if a message rule exists)

    Icon

    Description

    NW_cross_circle_red.png

    Severe

    NW_exclamation_triangle_orange.png

    Warning

    NW_info_circle_teal.png

    Information

    6

    Details

    Displays the statement in the Describe details view

    7

    Describe status

    Displays the status of statement processing for the packages that you selected

  4. Select one of the following sort options:
    • Default order
    • Sort by Cost
    • Sort by Severity
  5. (Optional) To view the messages for the statement, click the message severity icon. 
  6. Click Details on the statement that you want to inspect.
    The Describe details pane is displayed that includes the complete statement, cost, and explain data.
    describe_detail_view_callout_spe2005.png
    Legend

    #

    Description

    Details

    1

    Back

    Displays the Describe summary view

    2

    Statement details

    Displays the following information:

    • Package name
    • Statement number
    • Statement text
    • Cost
    • Explain (YES) details
    • Explain (ONLY) details

    3

    Performance perspective options

    Displays the Performance perspective options. For more information, see Setting-SQL-tuning-options.

    4

    Message severity indicator

    Indicates the highest severity of the message rules associated with the statement (if a message rule exists)

    Icon

    Description

    NW_cross_circle_red.png

    Severe

    NW_exclamation_triangle_orange.png

    Warning

    NW_info_circle_teal.png

    Information

    5

    Explain

    Opens an SQL Tuning Session for the statement. For more information, see Performance-perspective.

    6

    Describe status

    Displays the status of statement processing for the packages that you selected.

  7. (Optional) To open an SQL Tuning Session, click Explain.
    For more information, see Performance-perspective.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*