IBM Books

Command Reference

db2vexp - Dynamic Visual Explain

Explains a dynamic SQL statement, producing an access plan graph. Creates explain tables if they do not exist.

Authorization

The authorization rules are those defined for the SQL statement specified in the db2vexp command. For example, if a DELETE statement was used as the explainableStatementText, then the authorization rules for a DELETE statement apply. The current authorization ID must have INSERT privilege on the explain tables. If explain tables do not exist, the current authorization ID must also have CREATETAB privilege on the database. The explain tables will be created automatically.

Required Connection

None

Command Syntax

>>-db2vexp---db--databaseName---sql--explainableStatementText--->
 
      .--------------------------------.
      V                                |
>--------+--------------------------+--+-----------------------><
         +--withsnapshot------------+
         +--queryno--queryNumber----+
         +--querytag--queryTag------+
         +--opt--optimizationClass--+
         +--user--userid------------+
         +--password--password------+
         '--h-----------------------'
 

Command Parameters

-db databaseName
The name of the database where a connection will be made.

-sql explainableStatementText
The statement text to be dynamically explained, enclosed by double quotation marks.

-withsnapshot
Generates more explain details.

-queryno queryNumber
A query number to be associated with the dynamic explain.

-querytag queryTag
A query tag to be associated with the dynamic explain. It can be a maximum of twenty characters enclosed by double quotation marks.

-opt optimizationClass
Optimization class. Valid values are 0, 1, 2, 3, 5, 7, and 9. See SET CURRENT QUERY OPTIMIZATION in the SQL Reference.

-user userid
Specifies the user ID used to connect to the database.

-password password
Specifies the password used to connect to the database.

-h
Displays help information. When this option is specified, all other options are ignored and only the help is displayed. On Windows platforms, /? can also be used to specify the help option.

Usage Notes

A slash (/) can be used instead of a hyphen (-) to prefix a keyword.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]