Monitors and changes the behavior of applications that
run against a database. By default, a daemon is started on every
database partition, but the front-end utility can be used to start
a single daemon at a specific database partition.
Authorization
In an environment with an instance that has a db2nodes.cfg file
defined, you might also require the authorization to invoke the db2_all command.
Environments with a db2nodes.cfg file defined
include partitioned database environments as well as single-partition
database environments that have a database partition defined in db2nodes.cfg.
Command syntax
>>-db2gov------------------------------------------------------->
>--+-START--database--+-------------------------------------+--config-file--log-file-+-><
| '-DBPARTITIONNUM--db-partition-number-' |
'-STOP--database--+-------------------------------------+-------------------------'
'-DBPARTITIONNUM--db-partition-number-'
Command parameters
- START database
- Starts the governor daemon to monitor the specified database.
Either the database name or the database alias can be specified.
The name specified must be the same as the one specified in the governor
configuration file. One daemon runs for each database that is being
monitored. In a partitioned database environment, one daemon runs
for each database partition. If the governor is running for more than
one database, there will be more than one daemon running at that database
server.
- DBPARTITIONNUM db-partition-number
- Specifies the database partition on which to start or stop the
governor daemon. The number specified must be the same as the one
specified in the database partition configuration file.
- config-file
- Specifies the configuration file to use when monitoring the database.
The default location for the configuration file is the sqllib directory.
If the specified file is not there, the front-end assumes that the
specified name is the full name of the file.
- log-file
- Specifies the base name of the file to which the governor writes
log records. The log file is stored in the log subdirectory of the sqllib directory.
The number of database partitions on which the governor is running
is automatically appended to the log file name. For example, mylog.0,
mylog.1, mylog.2.
- STOP database
- Stops the governor daemon that is monitoring the specified database.
In a partitioned database environment, the front-end utility stops
the governor on all database partitions by reading the database partition
configuration file db2nodes.cfg.
Usage notes
In the
[action] clause
of the governor configuration file, the
nice nnn parameter
can be set to raise or lower the relative priority of agents working
for an application. For additional information, see
"Governor
rule elements" in the Related links section.
Note: On AIX® 5.3 or higher, the instance
owner must have the CAP_NUMA_ATTACH capability to be able to raise
the relative priority of agents working for the application. To grant
this capability, logon as
root and run the following
command:
chuser capabilities=CAP_NUMA_ATTACH,CAP_PROPAGATE
DB2 for Linux, UNIX, and Windows Version
9.7 is the last release to support the AIX 5.3
operating system.
On Solaris 10 or
higher, the instance owner must have the proc_priocntl privilege to
be able to raise the relative priority of agents working for the application.
To grant this privilege, logon as
root and run the
following command:
usermod -K defaultpriv=basic,proc_priocntl db2user
In
this example, proc_priocntl is added to the default privilege set
of user db2user.
Moreover, when DB2 is running in a non-global zone of Solaris,
the proc_priocntl privilege must be added to the zone's limit privilege
set. To grant this privilege to the zone, logon as
root and
run the following command:
global# zonecfg -z db2zone
zonecfg:db2zone> set limitpriv="default,proc_priocntl"
In
this example, proc_priocntl is added to the limit privilege set of
zone db2zone.
On Solaris 9, there is no facility
for DB2 to raise the relative
priority of agents. Upgrade to Solaris 10 or higher to use the ACTION
NICE clause of DB2 governor.
Compatibilities
For compatibility with
versions earlier than Version 8:
- The keyword NODENUM can be substituted for DBPARTITIONNUM.