Configuring a DB2 for Linux, UNIX, and Windows database to tune SQL statements with IBM Data Studio

You must configure your DB2® for Linux®, UNIX®, and Windows® database for IBM® Data Studio before you start tuning SQL statements with it.

Before you begin

About this task

You can configure your database to create EXPLAIN and ADVISE tables from Data Studio. These tables are used for query tuning. If these tables exist in the database in a different format or version, you see a message. Follow the instructions in the message to migrate the tables to the current version or format.

Procedure

To configure a DB2 for Linux, UNIX, and Windows database to tune SQL statements:

  1. In the Data Source Explorer, right-click the database that you want to configure and click Query Tuner > Configure for Tuning > Guided Configuration.

    A message indicates whether the configuration is successful.

  2. If you see a message that the format of some tables is not correct during the configuration process, follow the instructions in the message to migrate the EXPLAIN and ADVISE tables by running the given SQL statements on the database.
  3. Verify that the database is configured for query tuning and that the Index Advisor stored procedure is enabled:
    1. In the Data Source Explorer, right-click the database, and then click Query Tuner > Configure for Tuning > Advanced Configuration and Privilege Management. The Advanced Configuration and Privilege Management window opens.

      You can check the status of the EXPLAIN tables, automatic statistics collection, and the query tuning features.

    2. If the EXPLAIN tables are not enabled, follow the instructions in the message to enable the EXPLAIN tables.
  4. Close the Advanced Configuration and Privilege Management window.

Results

If you successfully configured the database, you can access the Data Studio IDE and Data Studio stand-alone features. For a list of features, see Single-query tuning features by product.

Feedback