Db2udb resource type attributes

The DB2 resource has several required and optional attributes.

Table: Required attributes for the agent for DB2 shows the required attributes for the agent for DB2.

Table: Required attributes for the agent for DB2

Required attributes

Description

DB2InstHome

Path to DB2 UDB instance home directory that contains critical data and configuration files for the DB2 instance.

Type and dimension: string-scalar

DB2InstOwner

User ID of Instance Owner that starts a DB2 UDB instance. Each instance requires a unique user ID.

Type and dimension: string-scalar

Caution:

Incorrect changes to this attribute can result in DB2 entering an inconsistent state.

Table: Optional attributes for the agent for DB2 shows the optional attributes for the agent for DB2.

Table: Optional attributes for the agent for DB2

Optional attributes

Description

DatabaseName

Name of the database for in-depth monitoring; required if in-depth monitor is enabled (IndepthMonitor = 1).

Note:

Be careful when you change the DataBase name attribute as you can fault all the partitions in the database. Do not change the DataBaseName attribute to an invalid or an incorrect value.

Type and dimension: string-scalar

NodeNumber

Node number or partition number of the database. Used when monitoring a specific database partition.

Default: 0

Type and dimension: integer-scalar

StartUpOpt

Provides start up options. The allowed values are: START, ACTIVATEDB, or CUSTOM.

Review the following options:

  • START (default)

    Starts the DB2 instance or partition.

  • ACTIVATEDB

    Performs activate database command after db2 processes start.

  • CUSTOM

    The agent leaves all the online function completely to the user when the StartUpOpt attribute is set to CUSTOM. It looks for a file named start_custom_$db2instance_$nodenum in the /opt/VRTSagents/ha/bin/Db2udb directory. If this file exists and is executable, it executes this customized online file instead.

    Example:

    To customize the online function for partition/nodenum 1 for the db2 instance named db2inst1, the agent for DB2 runs this customized file start_custom_db2inst1_1. It runs this file under the /opt/VRTSagents/ha/bin/Db2udb directory.

Type and dimension: string-scalar

ShutDownOpt

The allowed values for this attribute are STOP and CUSTOM.

Review the following options:

  • STOP

    Shuts the Db2 instance or partition down in the usual way.

  • CUSTOM

    Leaves all the offline function completely to the user when the ShutDownOpt is set to CUSTOM. It looks for a file named stop_custom_$db2instance_$nodenum in the /opt/VRTSagents/ha/bin/Db2udb directory.

    If this file exists and is executable, it executes this customized offline file instead.

    Example:

    You want to customize the offline function for partition/nodenum 0 for the db2 instance named db2inst1. You have the agent for DB2 run this customized file: stop_custom_db2inst1_0. The file is in the /opt/VRTSagents/ha/bin/Db2udb directory.

Type and dimension: string-scalar

IndepthMonitor

Set the value of the IndepthMonitor attribute to 1 to enable in-depth monitoring. Before this release, IndepthMonitor performed a default SQL query to the database. In 5.0, this default query no longer exists. The agent now looks for the monitor_custom_$db2instance_$nodenum file in the /opt/VRTSagents/ha/bin/Db2udb directory.

It executes this customized indepth monitor file if the file exists and is executable. You can find samples of custom monitor scripts in the sample_db2udb directory.

Type and dimension: string-integer

Encoding

Specifies the operating system encoding corresponding to DB2 UDB encoding for display of DB2 UDB output.

For example, if the environment variable LANG is set to "ja," then "eucJP" is the Solaris value for Encoding. Refer to DB2 UDB and Solaris documentation for respective encoding values. The default is "".

Type and dimension: string-scalar

AgentDebug

When the value of this attribute is 1, it causes the agent to log additional debug messages.

Type and dimension: boolean-scalar

WarnOnlyIfDBQueryFailed

This attribute either logs SQL errors, or checks the errors to handle them specially.

Set the value of the WarnOnlyIfDBQueryFailed attribute to 1 to enable it. When this attribute is enabled, it ignores all SQL errors and logs a warning message in the agent log once a day.

Set the value of the WarnOnlyIfDBQueryFailed attribute to 0 to disable it. When disabled, it checks if an error code needs to be handled specially in the db2error.dat file. If the error code does not exist in the db2error.dat file, then it returns OFFLINE for monitor. Otherwise, it follows the action of that particular error code in the db2error.dat file.

Type and dimension: boolean-scalar

ContainerName

Name of the Solaris zone (Solaris 10 only)

Type and dimension: string-scalar

Table: Internal attributes for the agent for DB2 shows the internal attributes for the agent for DB2.

Table: Internal attributes for the agent for DB2

Required attributes

Description

AgentDirectory

Specifies the location of other files and scripts that are related to the agent.

Do not use. For internal use only.