Client Side Configuration for Oracle RAC

Universal CMDB uses DataDirect's JDBC driver to connect to regular Oracle databases and to Oracle RAC databases.

Note Starting with version 10.33, to use Oracle JDBC driver, you may need to perform additional steps. For details, see Configuring Oracle JDBC Driver.

When using a RAC database, install the servers without creating the relevant UCMDB database schemas (for a description of UCMDB schemas, see Introduction to Preparing the Database Environment). After completing the client and server side RAC configuration, create the schemas as described in Create/Connect to a Universal CMDB Database.

Make the following changes in Universal CMDB's configuration files before you create the management database or connect to an existing one on Oracle RAC:

  1. On the UCMDB Server, create the file <Universal CMDB root directory>\UCMDBServer\conf\ucmdb-tnsnames.ora.

    The format of ucmdb-tnsnames.ora is the same as the Oracle tnsnames.ora network configuration file:

    <DB service name> =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <first instance virtual ip> ) (PORT = <first instance's listener port>))
    (ADDRESS = (PROTOCOL = TCP)(HOST = <second instance virtual ip> ) (PORT = <second instance's listener port>))
    (... entry for each instance...)
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = <DB service name>)
    )
    )

    where:

    • <DB service name> is the name of a service the listeners support. It is the same one used in the CONNECT_DATA part.

    • ADDRESS_LIST contains an address entry for each node in the RAC environment. In the case of Oracle 11g using SCAN, it contains only the SCAN virtual IP. The address contains all the details needed for connecting to the node:

      • HOST contains the virtual-IP for that instance. It is important to use the virtual IP and not the static IP of the node for faster failure detection.

      • PORT is the port on which the listener is configured to listen on that given node.

      • FAILOVER set to on allows the driver to try to connect to another node after failing to connect to one of the nodes. The connection attempts continue until a connection is successfully established to one of the nodes or until none of the nodes can be reached.

        An attempt to connect to another node takes place only if the connection to the current node fails. If the connection is refused by the node (for example, communication to the node was established, but the connection was rejected), no attempt is made to connect to another node.

        Caution Failover is for connection attempts only. If a connection fails during a database transaction, there is no failover of the transaction to another machine to continue the transaction.

      • LOAD_BALANCE set to on instructs the driver to distribute connection requests between the nodes to prevent overloading any single node. The order in which the driver accesses the nodes is random.

      • SERVER is the connection mode you want to use. There are two possible connection modes: dedicated and shared. Configure this according the Server configuration you support.

      • SERVICE_NAME is the name of a service that the listeners support. It is the same one you gave in <DB service name>.

    In the above example, ucmdb-tnsnames.ora would be configured as:

    UCMDBRAC =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Server1-Vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = Server2-Vip)(PORT = 1521))
    (LOAD_BALANCE = on)
    (FAILOVER = on)
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = UCMDBBSMRAC)
    )
    )
  2. On the UCMDB Server, open the directory <Universal CMDB root directory>\UCMDBServer\conf. Locate the jdbc.properties file.

    1. Find the line starting with cmdb.url.
    2. Replace this with the following line:

      cmdb.url=
      jdbc:mercury:oracle:TNSNamesFile=<Universal CMDB root directory>\\UCMDBServer\\conf\\ucmdb-tnsnames.ora;TNSServerName=<SERVICE NAME>

      where <SERVICE NAME> is the entry in ucmdb-tnsnames.ora, equivalent to the RAC service name.

      Note that each back slash (\) in the path of TNSNamesFile is doubled.

    3. If the file does not exist, create an empty jdbc.properties file under the above folder and add the following entry:

      Oracle = ddoracle
      cmdb.url = jdbc:mercury:oracle:TNSNamesFile=<Universal CMDB root directory>\\UCMDBServer\\conf\\ucmdb-tnsnames.ora;TNSServerName=<SERVICE NAME>

      where <SERVICE NAME> is the entry in ucmdb-tnsnames.ora, equivalent to the RAC service name.

    4. If your server is running the UNIX or LINUX operating system, replace all the double back slashes with single backslashes.