If you must
maintain explain table information that you previously gathered in
your existing DB2® copies from
previous releases, migrate your explain tables to DB2 Version 9.7.
You can manually
migrate your explain tables after you upgrade your database, or you
can later re-create the explain tables and gather new information.
If you plan to collect sections actuals, you must
migrate your explain tables or re-create them in Version 9.7.
Before you begin
Ensure that you have DBADM authority.
Additional authorization details are available in the Command Reference.
Procedure
To migrate the explain tables:
- Run the db2exmig command:
db2exmig -d dbname -e explain_schema [-u userid password]
where:
- dbname represents the database name. This parameter
is required.
- explain_schema represents the schema name of
the explain tables to be migrated. This parameter is required.
- userid and password represent
the current user's ID and password. These parameters are optional.
The explain tables belonging to the user ID that is running db2exmig,
or that is used to connect to the database, are migrated. The explain
tables migration tool renames the existing explain tables, creates
a new set of tables using the EXPLAIN.DDL file,
and copies the contents of the existing explain tables to the new
tables. Finally, it drops the existing explain tables. The db2exmig command
preserves any user added columns on the explain tables.
- Use Visual Explain to see a graphical display of a query
access plan or the db2expln command to see the
access plan information in the migrated explain tables.