IBM Books

DB2 Query Patroller Installation Guide


Installing DB2 Query Patroller

This chapter describes how to install DB2 Query Patroller server and agent components.



Figure hint not displayed.

If you are migrating from a previous version of this product refer to the "Migration" appendix for instructions before proceding with installation.


Introduction

Installation of DB2 Query Patroller on a database server system consists of installing the server component on one system node and installing the agent on one or more system nodes.

On a single-processor or symmetric multiprocessing (SMP) system, the server component and agent components run on the same computer. On a massively parallel processing (MPP) system or a cluster of computers, the server component runs on one node and the agent may be run on several nodes, including the DB2 Query Patroller server node.



Figure car not displayed.

There are a number of configuration steps required to setup the DB2 Query Patroller server. It is recommended that you use the DB2 Installer (db2setup) program, but if you want to use the operating systems native installation tools, see the "Manual Installation" appendix.


Installation Overview

DB2 Query Patroller requires a configured DB2 Universal Database Extended Enterprise Edition (DB2 UDB EEE) instance to work. It is recommended that you first create and set up a DB2 UDB EEE instance to be used with DB2 Query Patroller before you begin installation.

The installer program first checks the node you are installing on for existing DB2 Query Patroller components. If a component is already present on the node, that component will not be available for installation.

Server Installation

You can use the installer program to install the DB2 Query Patroller code and create a new DB2 UDB EEE instance. The configuration of this instance cannot be done using the DB2 Installer program. Refer to the DB2 Administration Guide for the necessary configuration steps for a DB2 UDB EEE instance. Once the instance has been configured, you may use the DB2 Installer to set up the DB2 Query Patroller server, or you can manually set up the server using the dqpsetup command (refer to the "Manual Installation" appendix for details). Using the DB2 Installer is recommended.

If you are using an existing instance of DB2 UDB EEE, you will be asked to provide information for a database, a nodegroup, and two tablespaces. The installer program will use this information when performing the DB2 Query Patroller server installation tasks listed below. If you are creating a new instance, you will not be prompted for this information.

  1. The named database is created if it does not exist.

  2. The named nodegroup is created for the database if the nodegroup does not exist.

  3. The first tablespace you specified is created in the nodegroup if it does not already exist.

  4. The IWM_RES_TBLSPC environment variable is updated using the name of the second tablespace you specified.
    Note:The installer does not create this tablespace for you. You must create this tablespace manually.

  5. The profiles of the DB2 UDB EEE instance owner are modified.

  6. The iwm user is set up to use the same DB2 environment as the DB2 UDB EEE instance owner.

  7. A DB2 Query Patroller schema named IWM, and various schema objects are created in the first tablespace.
    Note:If an IWM schema is already present you can choose to use this schema or replace it with a new one.

  8. The installation binds the files listed in db2qp.lst and db2qp_sp.lst. These files are found in DB2DIR/bnd.

  9. The /etc/services file is modified.

Agent Installation

The DB2 Query Patroller agent can be installed on any node used by the DB2 UDB EEE instance. The installer preforms the following tasks when installing an agent component:

  1. Installs the DB2 Query Patroller agent code.

  2. Modifies the /etc/services file.

  3. Sets the environment of the DB2 UDB EEE instance owner and user iwm.

Before You Begin

Before you begin installation, be sure you have the following items and information:

  1. Ensure that your system meets all of the memory, hardware, and software requirements to install DB2 Query Patroller. For more information, see System Requirements.

  2. Ensure that your system is running DB2 UDB EEE. Also, It is recommended that you have a configured Instance of DB2 UDB EEE.



Figure hint not displayed.

When you use the DB2 Installer program, you should be aware of the following:

  • The DB2 Installer's db2setup command only works with Bourne, and Kourne shells. Other shells are not supported.

  • You can generate a trace log, db2setup.trc, to record errors experienced during the installation. Run the db2setup command as follows:

    db2setup -d

    This creates a trace file, /tmp/db2setup.trc.



Step 1: Identify and Record Parameter Values

The Table below will help you determine the values required to install DB2 Query Patroller. Before proceeding with the installation, complete the Your Value column in the table. For descriptions of the parameter values see Parameter Definitions.

Table 5. Caption
Description
Information Required for DB2 Installer Default Value Your Value
Instance Name

Database Name

Nodegroup Name

Node Number

Tablespace Name

Tablespace Path

Result Tablespace Name

TCP/IP Service Name dqp1
TCP/IP Port Number 55000
DMS Tablespace Size

Parameter Definitions

Instance Name

This is the DB2 UDB EEE instance name you want to set up as the DB2 Query Patroller server. In the installer, this parameter is referred to as the User Name.

Database

Name of the database to be used with the DB2 Query Patroller server.

Nodegroup

Name of the nodegroup that contains the tablespace for the DB2 Query Patroller server.

Node Number

Node number of a single node where the nodegroup is defined.

Tablespace

Name of the DB2 Query Patroller tablespace. The default type is an SMS tablespace. You can use a DMS tablespace by providing a value for the DMS Tablespace Size parameter.

Tablespace Path

Full path name of the DB2 Query Patroller tablespace.

Result Tablespace

This parameter is used to set an environment variable for the DB2 Query Patroller server and for user iwm. Providing this parameter does not create the result tablespace, it only sets up the environment. The system administrator must create this tablespace. DB2 Query Patroller will route results sets to this tablespace.

TCP/IP Service Name

This value should be the same for DB2 Query Patroller server and agent.

TCP/IP Port Number

This value should be the same for DB2 Query Patroller server and agent.

DMS Tablespace Size

The DMS Tablespace Size parameter is optional. Providing a value for this parameter indicates that you want to use a DMS tables space. If you are using a DMS tablespace the path you entered for the tablespace path must be a valid file path. The default is an SMS tablespace.


Step 2: Mount the CD-Rom

To mount DB2 Query Patroller using the DB2 Installer program, you must first mount the CD-ROM. Once you have mounted the CD-ROM, you can start the installation. There are two sets of instructions: Mounting on AIX Systems and Mounting on Solaris Systems. Choose the appropriate instructions.

Mounting on AIX Systems

To mount the CD-ROM on AIX, perform the following steps:

  1. Log in as user with root authority.

  2. Insert the CD-ROM in the drive.

  3. Create a directory to mount the CD-ROM by entering the command shown below. The variable, cdrom, represents the CD-ROM mount directory.

    mkdir -p /cdrom

  4. Allocate a CD-ROM file system by entering the following command:

    smitty storage

  5. Select File Systems.

  6. Select Add / Change / Show / Delete File Systems.

  7. Select CDROM File System.

  8. Select Device Name.
    Note:Device names for CD-ROM file systems must be unique. If there is a duplicate device name, you may need to delete a previously-defined CD-ROM file system or use another name for your directory.

  9. In the pop-up window, enter the following as mount point:

    /cdrom.

  10. Mount the CD-Rom file system by entering the following command:

    smit mountfs.

  11. Enter a value in the FILE SYSTEM name field. For example, the name could be /dev/cd0.

  12. Enter a value in the Directory over which to mount field. For example, this value could be /cdrom.

  13. Enter a value in the Type of Filesystem field. For example, this value could be cdrfs.

  14. Set the Mount as READ-ONLY system to Yes.

  15. Click OK.

  16. Log out.


Figure car not displayed.

After mounting the CD-ROM file system, proceed to Step 3: Installation.

Mounting on Solaris Systems

To mount the CD-ROM on Solaris, perform the following steps:

  1. Log in as a user with root authority.

  2. If the Volume Manager is not running on your system, enter the following commands to mount the CD-ROM:

    mkdir -p /cdrom/unnamed_cdrom

    mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /cdrom/unnamed_cdrom where /cdrom/unnamed_cdrom represents the CD-ROM mount directory.If the Volume Manager (void) is running on your system, the CD-ROM is automatically mounted as: /cdrom/unnamed_cdrom



Figure hint not displayed.

If you are mounting the CD-ROM drive from a remote system using NFS, the CD-ROM file system on the remote machine must be exported with root access. You must also mount that file system with root access on the local machine.


Step 3: Installation

After you mount the CD-ROM file system, use the DB2 Installer program to install DB2 Query Patroller.

To install DB2 Query Patroller, perform the following steps:

  1. Log in as root.

  2. Insert the CD-ROM into the drive.

  3. Change to the directory where the CD-ROM is mounted by entering the following command:

    where /cdrom is the mount point of the CD-ROM drive on AIX, and /cdrom/unnamed_cdrom is the mount point of the CD-ROM on Solaris.

  4. Enter the ./db2setup command to start the DB2 Installer program. The DB2 Installer screen opens.

  5. Select Install and press the Enter key. The Install DB2 V6 screen opens.

    Press the Tab key to change the highlighted option and the Enter key to select or deselect an option. To go back to a previous window at any time select Cancel.

  6. On the DB2 Installer screen, select either DB2 Query Patroller Server or DB2 Query Patroller Agent and select OK.



    Figure car not displayed.

    If you are installing the agent component of DB2 Query Patroller, proceed to the section entitled "Installing the Agent".

    The DB2 Query Patroller set up program checks to see if DB2 Query Patroller components are already installed. If a component is already installed, the installation option for that component will not be available.
    Note:Installation of the server component automatically installs an agent component if an agent is not already present.

  7. You can designate an existing instance of DB2 UDB EEE as the DB2 Query Patroller server or you can create a new DB2 UDB EEE instance for this purpose. If you do not have an existing instance of DB2 UDB EEE, or you want to create a new DB2 UDB EEE instance, choose Create New Instance. Otherwise, select Use Existing Instance.

  8. Select OK.



    Figure car not displayed.

    If you chose Create New Instance, skip to the section entitled "Creating a New DB2 Instance."

  9. The Use Existing Instance screen opens. Fill in the parameter fields with the information you recorded in Step 1: Identify and Record Parameter Values.

    The DMS Tablespace Size parameter is optional. Providing a value for this parameter indicates that you want to use a DMS tablespace. The default is an SMS tablespace.

  10. Once you have finished filling in the parameter values, select OK to finish the DB2 Query Patroller server installation.
    Note:Once the server has been installed, a result tablespace must be created. Refer to the result tablespace parameter definition in the section entitled Parameter Definitions for more information.

Creating a New DB2 Instance

  1. Following the on-screen instructions, create a new DB2 UDB EEE instance. Refer to the DB2 Administration Guide for assistance. Once you have created a new DB2 UDB EEE instance, you must configure the instance before proceeding with the DB2 Query Patroller installation. This cannot be done using the DB2 Installer. Refer to the DB2 Administration Guide for instructions on configuring a DB2 UDB EEE instance.

  2. Once the new instance has been configured, return to the DB2 Installer. Select Setup, then select OK to continue.
    Note:An alternative to returning to the DB2 Installer is to continue the install manually by running the dqpcrt and dqpsetup command. Refer to the "Manual Installation" appendix for more information.

  3. Select DB2 Query Patroller server and select OK.

  4. Select Use Existing Instance and select OK.

  5. Fill in the parameter fields with the information you recorded in Step 1: Identify and Record Parameter Values. For the User Name parameter, provide the name of the DB2 UDB EEE instance you created.

    The DMS Tablespace Size parameter is optional. Providing a value for this parameter indicates that you want to use a DMS tablespace. The default is an SMS tablespace.

  6. Once you have finished filling in the parameter values, select OK to finish the DB2 Query Patroller server installation.
    Note:Once the server has been installed, a result tablespace must be created. Refer to the result tablespace parameter definition in the section entitled Parameter Definitions for more information.

Installing the Agent

Before you can install an agent, the server component must be installed. Also, the home directory of the DB2 UDB EEE instance on which the server is installed must be visible to the nodes you want to install the agent on.

Fill in the user name, service name and port number parameter fields with the information you recorded in Step 1: Identify and Record Parameter Values. Select OK.
Note:The service name and port number you provide for the agent should be the same as the service name and port number of the DB2 Query Patroller server.

Verifying the Installation

Before performing the installation verification you must do the following:

Set up an instance environment and invoke the DB2 command-line processor. Run the start-up script as follows:



For a C shell enter: source . INSTHOME/sqllib/db2cshrc


For a C shell enter: source . INSTHOME/sqllib/dqpcshrc

The . INSTHOME variable represents the home directory of the instance.

Perform the following procedure to verify successful software installation:

  1. Log in as iwm on the DB2 Query Patroller server node.

  2. Enter the following command to start the server and agent components:

    iwm start all



    Figure hint not displayed.

    You can also log in on the DB2 Query Patroller server node and execute iwm start server and then log in on the agent nodes and execute iwm start agent.

  3. Enter the following command to submit a query:

    iwm_submit -S "SELECT COUNT(*) FROM ibm.systables"

  4. From the same node, enter the following command to check the status of the query:

    iwm_cmd

  5. Check e-mail for notification of the query's completion. It may take a few moments for the mail to be sent.

  6. To stop the DB2 Query Patroller software, enter the following command:

    iwm stop

If DB2 Query Patroller does not start or the query does not run, look in the $IWMLOG directory. The syserr.log file may contain error messages related to the failed query. The /tmp/db2setup.log file contains a transcript of the installation. The contents of these files may be required by the DB2 Query Patroller support team to diagnose problems.


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

[ DB2 List of Books | Search the DB2 Books ]