DB2 Version 9.7 for Linux, UNIX, and Windows

qpsetup - Set up Query Patroller server Command

The qpsetup command can do the following:
  • Set up a Query Patroller server on a specified DB2® database.
  • Replace Query Patroller control tables on a specified control table space.

Authorization

The following section applies to setting up a Query Patroller server on a specified DB2 database:

Required connection

None. This command establishes a database connection.

Command Syntax

Read syntax diagramSkip visual syntax diagram
>>-qpsetup--+-------------------------------------+------------->
            '-USER--user-name--PASSWORD--password-'   

>--DB--db-name-------------------------------------------------->

>--+------------------------------------------------------------------------------------------------+-><
   +-CONTROL_TABLESPACE--tablespace-name--+-------------------------------------------------------+-+   
   |                                      +-CONTROL_DBPARTITIONGROUP--db-partition-group-name-----+ |   
   |                                      |                         .-,-------------------------. | |   
   |                                      |                         V                           | | |   
   |                                      +-CONTROL_DBPARTITIONNUM----db-partition-group-number-+-+ |   
   |                                      +-CONTROL_PATH--tablespace-path-------------------------+ |   
   |                                      +-CONTROL_DMS--+-YES-+----------------------------------+ |   
   |                                      |              '-NO--'                                  | |   
   |                                      +-CONTROL_DMS_CONTAINER--+-FILE---+---------------------+ |   
   |                                      |                        '-DEVICE-'                     | |   
   |                                      '-CONTROL_DMS_NUMPAGES--number-of-4K-pages--------------' |   
   '-RESULT_TABLESPACE--tablespace-name--+------------------------------------------------------+---'   
                                         +-RESULT_DBPARTITIONGROUP--db-partition-group-name-----+       
                                         |                        .-,-------------------------. |       
                                         |                        V                           | |       
                                         +-RESULT_DBPARTITIONNUM----db-partition-group-number-+-+       
                                         +-RESULT_PATH--tablespace-path-------------------------+       
                                         +-RESULT_DMS--+-YES-+----------------------------------+       
                                         |             '-NO--'                                  |       
                                         +-RESULT_DMS_CONTAINER--+-FILE---+---------------------+       
                                         |                       '-DEVICE-'                     |       
                                         +-RESULT_DMS_NUMPAGES--number-of-4K-pages--------------+       
                                         +-REPLACE----------------------------------------------+       
                                         '-HELP-------------------------------------------------'       

Command parameters

USER user-name
This parameter specifies the name under which qpsetup is run.
PASSWORD password
This parameter specifies the corresponding password of the above mentioned user. This parameter is required if the USER parameter is specified. The above mentioned user will be prompted for a password if the user does not supply one.
DB db-name
This parameter specifies the name of the database on which you want to set up DB2 Query Patroller. This parameter is required.
CONTROL_TABLESPACE tablespace-name
This parameter specifies the name of the table space on which you want to create DB2 Query Patroller control tables. This parameter is required. If the table space does not exist, then it will be created. For increased performance and high availability, it is recommended that the control table space be in a single database partition group and at the same database partition where the DB2 Query Patroller server is launched.
CONTROL_DBPARTITIONGROUP db-partition-group-name
This parameter specifies the name of the database partition group on which you want to create the control table space. This parameter is optional. If the specified database partition group does not exist, then it will be created. If it is not specified, then the table space will be created on the default database partition group, IBMDEFAULTGROUP. This parameter is ignored if the control table space already exists. For increased performance and high availability, it is recommended that the control tablespace be in a single database partition group and on the same database partition where the DB2 Query Patroller server is launched.
CONTROL_DBPARTITIONNUM db-partition-group-number
This parameter specifies the database partition numbers on which you want to create the control database partition group. This parameter is optional. If it is not specified, then the database partition group will be created on all database partitions. This parameter will be ignored if the CONTROL_DBPARTITIONGROUP parameter is not specified, or if the database partition group already exists.
CONTROL_PATH tablespace-path
This parameter specifies the path of the table space containers for the control table space. This parameter is required if the control table space needs to be created. It will be ignored otherwise.
CONTROL_DMS YES | NO
This parameter specifies if the control table space to be created is a DMS table space or an SMS table space This parameter is optional. The default value is NO. This parameter is ignored if the control table space already exists.
CONTROL_DMS_CONTAINER FILE | DEVICE
This parameter specifies if the container type is FILE or DEVICE. This parameter is optional. The default value is FILE. This parameter is ignored if the control table space already exists and if the CONTROL_DMS parameter is not specified or has NO as its value.
CONTROL_DMS_NUMPAGES number-of–4K-pages
This parameter specifies the number of 4K pages to be created for the control table space. This parameter is required if the CONTROL_DMS parameter value is YES. This parameter is ignored if the control table space already exists.
RESULT_TABLESPACE tablespace-name
This parameter specifies the name of the table space on which you want to create the result tables. This parameter is required. If the table space does not exist, it will be created.
RESULT_DBPARTITIONGROUP db-partition-group-name
This parameter specifies the name of the database partition group on which you want to create the result table space. This parameter is optional. If it is not specified, then the table space will be created on the default database partition group, IBMDEFAULTGROUP. This parameter is ignored if the result table space already exists.
RESULT_DBPARTITIONNUM db-partition-group-number
This parameter specifies the database partition numbers on which you want to create the result database partition group. This parameter is optional. If it is not specified, then the database partition group will be created on all database partitions. This parameter will be ignored if the RESULT_DBPARTITIONGROUP parameter is not specified, or if the specified database partition group already exists.
RESULT_PATH tablespace-path
This parameter specifies the path of the table space containers for the result table space. This parameter is required if the result table space needs to be created. This parameter will be ignored otherwise.
RESULT_DMS YES | NO
This parameter specifies if the result table space to be created is a DMS table space or an SMS table space. This parameter is optional. The default value is NO. This parameter is ignored if the result table space already exists.
RESULT_DMS_CONTAINER FILE | DEVICE
This parameter specifies if the container type is FILE or DEVICE. This parameter is optional. The default value is FILE. This parameter is ignored if the result table space already exists and if the RESULT_DMS parameter is not specified or has NO as its value.
RESULT_DMS_NUMPAGES number-of–4K-pages
This parameter specifies the number of 4K pages to be created for the result table space. This parameter is required if the RESULT_DMS parameter value is YES. This parameter is ignored if the result table space already exists.
REPLACE
This parameter specifies whether or not the DB2 Query Patroller control tables are to be replaced with new ones, if they already exist. This parameter is optional.
HELP
This parameter specifies that the qpsetup command syntax is to be displayed.

Authorization

The following section applies to replacing Query Patroller control tables on a specified control table space:

Required connection

None. This command establishes a database connection.

Command syntax

Note: If the table space does not exist, it will NOT be created and an error message will be returned.
Read syntax diagramSkip visual syntax diagram
>>-qpsetup--CONTROL_TABLES_ONLY--+-------------------------------------+-->
                                 '-USER--user-name--PASSWORD--password-'   

>--DB--db-name--CONTROL_TABLESPACE--tablespace-name------------->

>--+---------+-------------------------------------------------><
   '-REPLACE-'   

Command parameters

CONTROL_TABLES_ONLY
This parameter specifies that qpsetup will only create the DB2 Query Patroller control tables, without creating table spaces nor binding packages.
USER user-name
This parameter specifies the name under which qpsetup is run.
PASSWORD password
This parameter specifies the corresponding password of the above user. This parameter is required if USER is specified. The above mentioned user will be prompted for a password if the user does not supply one.
DB db-name
This parameter specifies the name of the database on which you want to setup DB2 Query Patroller. This parameter is required.
CONTROL_TABLESPACE tablespace-name
This parameter specifies name of the table space on which you want to create DB2 Query Patroller control tables. This parameter is required. If the table space does not exist, then an error message will be returned.
REPLACE
This parameter specifies whether or not the DB2 Query Patroller control tables are to be replaced with new ones, if they already exist. This parameter is optional.

Usage notes