Configuring Network Manager to use Db2HADR or an Oracle RAC service

Use this information to force the Network Manager core processes to use the Db2® alias or to connect to an Oracle RAC service name, depending on your database type.

Before you begin

Db2:For Db2 databases, the Network Manager core processes need to use the Db2 alias to obtain information about the alternate Db2 server. To force the Network Manager core processes to use the Db2 alias, edit two configuration files (DbLogins.Domain.cfg and MibDbLogin.cfg) and then edit the driver file:
$NCHOME/precision/platform/linux2x86/db2-version-number/odbc_cli/clidriver/
cfg/db2dsdriver.cfg
Where version-number is the Db2 version number; for example, 10.5.0.5.

Oracle:For Oracle databases, the Network Manager core processes need to connect to the service name used by Oracle RAC. To configure the Network Manager core processes to use an SID instead of a service name, edit the DbLogins.Domain.cfg and MibDbLogin.cfg configuration files.

About this task

The DbLogins.Domain.cfg and MibDbLogin.cfg configuration files are part of the Network Manager core installation. These files are stored on the Network Manager server. If you have Network Manager failover configured, edit these configuration files on both the primary and backup Network Manager servers.

Procedure

  1. On the Network Manager primary server, open the $NCHOME/etc/precision/DbLogins.Domain.cfg file and make the following changes depending on your database type:
    Option Description
    Db2:For Db2 databases
    1. Search for the attribute called m_PortNum.
    2. Set the value of all m_PortNum attributes to 0 (zero).
    3. Write and quit the configuration file.

    Perform the same steps on the Network Manager backup server, if necessary.

    Oracle:For Oracle databases
    1. Search for the attribute called m_OracleService and add it after m_PortNum if it does not already exist.
    2. Do not change the value of the m_OracleService attribute for "DNCIM",. Set the value of all the other m_OracleService attributes to 1.
    3. Ensure m_DbName is set to the Oracle SERVICE_NAME as specified in $ORACLE_HOME/network/admin/tnsnames.ora
    4. Ensure m_Hostname is set to the Oracle RAC SCAN host name.
    5. Optionally, you can define your own custom Oracle RAC connection string using the attribute m_ConnectionString, as described here. This connection string can be used for connecting to an Oracle RAC cluster, or for other purposes.
    6. Write and quit the configuration file.

    Perform the same steps on the Network Manager backup server, if necessary.

  2. On the Network Manager primary server, open the $NCHOME/etc/precision/MibDbLogin.cfg file and make the following changes depending on your database type:
    Option Description
    Db2:For Db2 databases
    1. Search for the attribute called m_PortNum.
    2. Set the value of m_PortNum attribute to 0 (zero).
    3. Write and quit the configuration file.

    Perform the same steps on the Network Manager backup server, if necessary.

    Oracle:For Oracle databases
    1. Search for the attribute called m_OracleService and add it after m_PortNum if it does not already exist.
    2. Set the value of m_OracleService attribute to 1.
    3. Ensure m_DbName is set to the Oracle SERVICE_NAME as specified in $ORACLE_HOME/network/admin/tnsnames.ora
    4. Ensure m_Hostname is set to the Oracle RAC SCAN host name.
    5. Optionally, you can define your own custom Oracle connection string using the attribute m_ConnectionString, as described here. This connection string can be used for connecting to an Oracle RAC cluster, or for other purposes.
    6. Write and quit the configuration file.

    Perform the same steps on the Network Manager backup server, if necessary.

  3. Db2: For Db2 databases, you also need to perform the following procedure:
    1. Copy the following sample driver file to the same location with a new file name, as follows:

      cp $NCHOME/precision/platform/linux2x86/db2-version-number/odbc_cli/clidriver/cfg/db2dsdriver.cfg.sample $NCHOME/precision/platform/linux2x86/db2-version-number/odbc_cli/clidriver/cfg/db2dsdriver.cfg

      Where version-number is the Db2 version number; for example, 10.5.0.5

      Note: If you are already using this driver file, then make a backup of the file and edit the driver file directly rather than copying the sample driver file.
    2. Find the <configuration> section of the driver file.
    3. Update the <configuration> section as follows:
      <configuration>
          <dsncollection>
              <dsn alias="Database_alias" 
              name="Primary_ database_name" host="Primary_database_host"
              port="Primary_database_port"/>
          </dsncollection>
          <databases>
              <database name="Primary_database_name" 
              host="Primary_database_host" port="Primary_database_port"/>
                <wlb>
               <parameter name="enableWLB" value="true"/>
               <parameter name="maxTransports" value="50"/>
            </wlb>
            <acr>
                <parameter name="enableAcr" value="true" />
                <parameter name="maxAcrRetries" value="10" />
                <parameter name="acrRetryInterval" value="5" />
                <parameter name="enableAlternateServerListFirstConnect" value="true" />
            <alternateserverlist>
               <server name="server1" hostname="Primary_database_host"    port="Primary_database_port" />
               <server name="server2" hostname="Standby_database_host"    port="Standby_database_port" />
            </alternateserverlist>
            </acr>
          <database name="Standby_database_name" 
              host="Standby_database_host" 
              port="Standby_database_port"/>
          </databases>
      </configuration>
      Where the following items are all listed in the DbLogins_DOMAIN.cfg configuration file:
      • Database_alias is the name of the primary database.
        Note: For convenience, the name of the primary database is also used as the database alias.
      • Primary_ database_name is the name of the primary database.
      • Primary_database_host is the hostname of the primary database server.
      • Primary_database_port is the port for the primary database.
      • Standby_database_name is the name of the standby database
      • Standby_database_host is the hostname of the standby database server.
      • Standby_database_port is the port for the standby database.
    4. Save the db2dsdriver.cfg driver file.