If you do not want to use the IBM® Data
Studio client to configure a DB2® for Linux, UNIX, and Windows database,
you can carry out the configuration by editing and running a number
of scripts.
Procedure
- Run the file EXPLAIN.DDL on the database
that you want to use for tuning SQL. This file is located
in the MISC folder in your DB2 installation.
- If you are using the IBM Data
Studio full client, Version 3.1.1, the IBM InfoSphere Optim Query Workload Tuner for DB2 for Linux, UNIX, and Windows, Version 3.1.1 License Activation
Kit is installed on your workstation: Run the file License.bat (for Windows systems) or License.sh (for Linux systems), which is in the
directory <IBM Data Studio installation directory>\QueryTunerServerConfig\all_features\LUW\License\,
to activate the product license on the database.
- In a DB2 command
window, connect to the database on which you want to activate the
license.
- Change to the directory in which the License.bat (for Windows systems) or License.sh (for Linux systems) file is located.
- Run the file with the db2 -vtf command.
- In a text editor, edit the file luwsp.sql,
which is in the directory <IBM Data Studio installation
directory>\QueryTunerServerConfig\all_features\LUW\IA\,
by replacing the $install variable with the absolute
path to this file. You do not need to run the file after
you edit it. In a later step, you will run a batch file that will
run this file.
- In a text editor, edit the file wccexplainsp.sql,
which is in the directory <IBM Data Studio installation
directory>\QueryTunerServerConfig\all_features\LUW\WCC\,
by replacing the $install variable with the absolute
path to this file. You do not need to run the file after
you edit it. In a later step, you will run a batch file that will
run this file.
- Open an DB2 command
window, connect to the database that you activated the license on,
and change to the directory <IBM Data Studio
installation directory>\QueryTunerServerConfig\all_features\LUW\.
- Run the file enablement_win.bat (on Windows systems) or enablement_LinuxUnix.sh (on Linux systems).
- Check these output files in the current directory for errors: luwsp.out, oqt_profile.out, wccexplainsp.out,
and wccluwddl.out
What to do next
To start tuning in the
Query Tuner Workflow Assistant,
right-click the connection in the Data Source Explorer, then click .
Recommendation: In the DB2 for Linux, UNIX, and Windows database
that you are configuring, create a system temporary table space with
a page size of 8 KB or larger to avoid potential query tuning errors.