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:
- You require SYSADM authority to run the qpsetup command.
Required connection
None. This command
establishes a database connection.
Command Syntax
>>-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:
- You require DBADM authority to make specifications on existing
table spaces using the qpsetup command.
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.
>>-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
- For each database that you want to use Query Patroller with, you
need to run the qpsetup command. For each database,
this will create a set of Query Patroller control database objects,
such as control tables, views and triggers associated with the tables,
as well as user defined functions and procedures required for QP execution.
The control tables contain information such as configuration settings,
user profiles, and historical query data.