Cluster Server 7.4.2 Agent for DB2 Installation and Configuration Guide - Linux

Last Published:
Product(s): InfoScale & Storage Foundation (7.4.2)
Platform: Linux
  1. Introducing the Cluster Server Agent for DB2
    1.  
      About the Cluster Server Agent for DB2
    2.  
      How Cluster Server Agent for DB2 makes DB2 highly available
    3.  
      How the DB2 agent supports intelligent resource monitoring
    4.  
      Supported software for VCS agent for DB2
    5. About agent functions for VCS Agent for DB2
      1.  
        About the online agent function for VCS agent for DB2
      2.  
        About the offline agent function for VCS agent for DB2
      3.  
        About the monitor agent function for VCS agent for DB2
      4.  
        About the clean agent function for VCS agent for DB2
      5.  
        About the info agent function for VCS agent for DB2
      6.  
        About the action agent function for VCS agent for DB2
      7. About IMF Integration functions for VCS Agent for DB2
        1.  
          About the imf_init function for VCS agent for DB2
        2.  
          About the imf_register function for VCS agent for DB2
        3.  
          About the imf_getnotification function for VCS agent for DB2
      8.  
        About running the info agent function to get database information for VCS agent for DB2
    6.  
      Typical DB2 configuration in a Cluster Server
    7.  
      Road map for setting up DB2 UDB in a VCS environment
  2. Installing and configuring DB2
    1. VCS requirements for installing DB2
      1.  
        Preparing to install DB2 UDB non-MPP versions
      2.  
        Preparing to install DB2 UDB MPP versions
      3.  
        Creating the file systems for non-MPP instances for DB2
      4.  
        Creating the shared file systems for MPP instances for DB2
      5. Defining user and group accounts for DB2
        1.  
          Creating user group accounts for DB2
        2.  
          Adding user accounts for DB2 on Linux
    2.  
      Installing DB2 in a VCS environment
    3. Setting up the DB2 configuration
      1.  
        Checking /etc/services for DB2
      2.  
        Enabling password less communication for DB2 users among all cluster nodes
      3.  
        Modifying the $DB2InstHome/sqllib/db2nodes.cfg file for DB2
      4.  
        Confirming the DB2 installation
  3. Installing and removing the Cluster Server Agent for DB2
    1.  
      Before you install or upgrade the VCS Agent for DB2
    2.  
      Installing the VCS agent for DB2 software
    3.  
      Upgrading the VCS Agent for DB2
    4.  
      Disabling the VCS Agent for DB2
    5.  
      Removing the VCS Agent for DB2
  4. Configuring VCS service groups for DB2
    1.  
      About configuring service groups for DB2
    2. About DB2 configurations in VCS
      1.  
        Non-MPP configuration service groups for DB2
      2. MPP configuration service groups for DB2
        1.  
          Parallel CVM service group for MPP configuration for DB2
        2.  
          Failover service group for MPP configuration for DB2
    3. Before configuring the service group for DB2
      1.  
        Importing the Db2udbTypes.cf file
    4. Configuring the VCS Agent for DB2 from Cluster Manager (Java Console)
      1.  
        Adding service group for DB2 MPP using the Cluster Manager (Java Console)
      2.  
        Adding a service group for DB2 non-MPP with the Cluster Manager (Java Console)
    5. Configuring the VCS Agent for DB2 by editing the main.cf file
      1.  
        Configuring the agent to use the DB2 MPP configuration
      2.  
        Configuring the agent to use the DB2 non-MPP configurations
      3.  
        Verifying the configuration for VCS agent for DB2
    6. Setting up in-depth monitoring of a DB2 instance
      1.  
        Enabling in-depth monitoring of a DB2 instance
      2.  
        Enabling in-depth monitoring from the command line for DB2
      3. Enabling and disabling intelligent resource monitoring for Db2udb resource
        1.  
          Administering the AMF kernel driver
      4.  
        Handling DB2 error codes during in-depth monitoring
      5.  
        Disabling in-depth monitoring for DB2
  5. Administering VCS service groups for DB2
    1.  
      About administering service groups for DB2
    2.  
      Bringing the DB2 service group online
    3.  
      Taking the DB2 service group offline
    4.  
      Switching the DB2 service group
    5.  
      Disabling the agent for DB2
  6. Appendix A. Troubleshooting Cluster Server Agent for DB2
    1.  
      Creating a db2profile for environment variables for DB2
    2.  
      Setting the RestartLimit attribute for VCS agent for DB2
    3.  
      Partition/Node switch-over scenarios for DB2 in MPP mode
  7. Appendix B. Resource type information for Cluster Server Agent for DB2
    1. About the resource type definitions for DB2
      1.  
        DB2 UDB type definition file: Db2udbTypes.cf on Linux
  8. Appendix C. Resource type attributes for DB2
    1.  
      About the Db2udb resource types and attribute definitions
  9. Appendix D. Sample configurations
    1. Sample configuration files for VCS agent for DB2 on Linux
      1.  
        Non-MPP main.cf configuration for VCS agent for DB2 on Linux
      2.  
        MPP main.cf configuration for VCS agent for DB2 on Linux

About the Db2udb resource types and attribute definitions

Review the description of the DB2 agent attributes. The agent attributes are classified as required, optional, and internal.

Table: Required attributes for the agent for DB2 shows the required attributes for the agent for DB2, you must assign values to required attributes.

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

Note:

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).

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.

Note:

Make sure the database with the provided DatabaseName has been created in the same partition for which the Db2udb agent resource has been configured.

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 (Default)

    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. 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.

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

UseDB2start

Enables you to choose an alternate way to start DB manager. The agent executes the db2start when UseDBStart is set to 1, whereas it uses db2gcf when UseDBStart is set to 0. If the setup is non-MPP, you must set the value of the UseDB2start attribute to 1.

If the setup is MPP, you must set the value of the UseDB2start attribute to 0. For MPP, VCS uses the actual hostname and needs the ability to start and stop each partition. For this purpose, VCS uses the db2gcf command and requires a value of 0 for the UseDB2start attribute.

Type and dimension: boolean-scalar

Default: 0

For more information on using UseDB2start attribute refer : See About DB2 configurations in VCS.

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

Table: Internal attribute for the agent for DB2

Internal attributes

Description

AgentDirectory

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

Do not use. For internal use only.

IMF

This resource-type level attribute determines whether the DB2 agent must perform intelligent resource monitoring.

This attribute includes the following keys:

  • Mode: Define this attribute to enable or disable intelligent resource monitoring.

    Valid values are as follows:

    • 0 - Does not perform intelligent resource monitoring

    • 1 - Performs intelligent resource monitoring for offline resources and performs poll-based monitoring for online resources

    • 2 - Performs intelligent resource monitoring for online resources and performs poll-based monitoring for offline resources

    • 3 - Performs intelligent resource monitoring for both online and for offline resources

    Default: 2

  • MonitorFreq: This key value specifies the frequency at which the agent invokes the monitor agent function. The value of this key is an integer.

    Default: 5

    You can set this key to a non-zero value for cases where the agent requires to perform both poll-based and intelligent resource monitoring.

    If the value is 0, the agent does not perform poll-based process check monitoring. After the resource registers with the AMF kernel driver, the agent calls the monitor agent function as follows:

    • After every (MonitorFreq x MonitorInterval) number of seconds for online resources

    • After every (MonitorFreq x OfflineMonitorInterval) number of seconds for offline resources

  • RegisterRetryLimit: If you enable intelligent resource monitoring, the agent invokes the imf_register agent function to register the resource with theAMF kernel driver. The value of the RegisterRetryLimit key determines the number of times the agent must retry registration for a resource. If the agent cannot register the resource within the limit that is specified, then intelligent monitoring is disabled until the resource state changes or the value of the Mode key changes.

    Default: 3.

See Enabling and disabling intelligent resource monitoring for Db2udb resource.