Oracle Internet Directory (OID) and Real Application Cluster (RAC) database : Things you must know

Oracle Internet Directory (OID) uses database as the persistent store for its data (users, group, access control, configuration….). Oracle Database can be configured in number of high availability configuration including RAC (Real Application Cluster) database, Oracle Data Guard, Cold Failover Cluster …

This post covers considerations for Oracle Internet Directory configured with a high availability Oracle database, Oracle Real Application Clusters (RAC).

OID 11g consists of two type of components
a) Java Components (running on WebLogic) – DIP , ODSM
b) System Component – OID LDAP processes

Communication from Oracle Internet Directory (OID LDAP Server, odsm, dip, replication) to database can be

  • Java-based OID components deployed to Oracle WebLogic Server (ODSM, DIP)
  • Java-based OID components that are standalone Java Clients
  • Non-Java or System components for OID (C-based application) like OID LDAP Server

.

a) Java-based OID components deployed to Oracle WebLogic Server – For establishing connection pools, Oracle Fusion Middleware supports only “multi data sources” for the Oracle RAC back end. To know more about data source & multi data sources click here and here

Multi Datasource can be configured either using Fusion Middleware Control (em), Configuration Wizard (config.sh) or usign WebLogic Scripting Tool (WLST)

When an Oracle RAC node or instance fails, session requests are redirected to another node in the cluster, either by Oracle WebLogic Server or by the Oracle Thin driver. There is no failover of existing connections, however, new connection requests from the application are managed using existing connections in the Oracle WebLogic pool or by new connections to the working Oracle RAC instance. In-flight transactions are typically rolled back when the database is the transaction manager. When the WebLogic Server is the Transaction Manager, in-flight transactions are failed over, meaning they are driven to completion or rolled back, based on the state of the transaction at the time of the failure. The data sources that form a multi data source are accessed using a round-robin scheme (recommended configuration)

.

b) Java-based OID components that are standalone Java Clients

Java J2SE-based Oracle Fusion Middleware components can be deployed to use both the Oracle thin JDBC driver, or the OCI (Oracle Call Interface) based JDBC drivers.

JDBC Thin client is a pure Java, Type IV driver and communicates with the database using TTC (Two task Common) protocol
The JDBC OCI client is a Type II driver and provides connections to JDBC clients over the Oracle Net protocol.

c) Non-Java / System Component – These are applications written in C like OID ldap server. These components use the “Oracle Call Interface (OCI)” layer to interact with Oracle databases OID components.  High availability Event Notification provides a signal to the non-Java application if database failure occurs. Oracle Internet Directory integrates with high availability Event Notification. With high availability Event Notification, connections are automatically broken and cleaned up by OCI (Oracle Call Interface) and the application callback is invoked within seconds of failure.

.

OID (11.1.1.2 and lower) Non-Java (SYSTEM) supports only TAF (Transparent application Failover). FCF (Fast Connection Failover is not supported). More on TAF here

1. TAF is configured using either client-side specified TNS connect string or using server-side service attributes. However, if both methods are used to configure TAF, the server-side service attributes will supersede the client-side settings. The server-side service attributes are the preferred way to set up TAF in OID.

2. TAF can operate in one of two modes Session Failover and Select Failover. This is denoted by FAILOVER_TYPE in V$SESSION
a) Session Failover will re-create lost connections and sessions (SESSION)
b) Select Failover will replay queries that were in progress (SELECT)

Third value NONE means No failover configured.

SELECT is recommended mode.

3.  TAF used METOHD to determines how fast failover occurs from the primary node to the backup node.
a) BASIC – Set to establish connections at failover time. This option requires almost no work on the backup server until failover time.
b) PRECONNECT – Set to pre-established connections. This provides faster failover but requires that the backup instance be able to support all connections from every supported instance.

4. To create database service and configure server-side Transparent Application Failover (TAF) settings use

SQL> EXECUTE
DBMS_SERVICE.CREATE_SERVICE(
SERVICE_NAME => ‘oid.mycompany.com‘,
NETWORK_NAME => ‘oid.mycompany.com‘,
AQ_HA_NOTIFICATIONS => TRUE,
FAILOVER_METHOD => DBMS_SERVICE.FAILOVER_METHOD_BASIC,
FAILOVER_TYPE => DBMS_SERVICE.FAILOVER_TYPE_SELECT,
FAILOVER_RETRIES => 5, FAILOVER_DELAY => 5);

and then add service to database and assign to RAC database instances using SRVCTL

srvctl add service -d oid -s oid -r racnode1,racnode2

5. To verify TAF configuration in OID database use

SQL> SELECT MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER, COUNT(*)
FROM V$SESSION
GROUP BY MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER;

.

References/Related

Share This Post with Your Friends over Social Media!

About the Author Atul Kumar

Oracle ACE, Author, Speaker and Founder of K21 Technologies & K21 Academy : Specialising in Design, Implement, and Trainings.

follow me on:

Leave a Comment:

5 comments
cristiano says June 3, 2011

hi,
i need to migrate the OID database from a single instance database to a new RAC instance.
The database version of both is:11.2.0.1.0.

The OID is also used by OAM 10g.

I think to proceed in this manner:

1 – export the schema from local database

2 – import schema to RAC database

3 – stop OID instance

4 – change the tnsnames.ora in the folder oidinstance/config with the configuration of RAC

5 – control if i need to change something in oidinstance/config/OPMN/opmn/opmn.xml

6 – start oid

Can be it the correct manner ?

Thanks

Reply
Atul Kumar says June 3, 2011

@ cristiano,
OAM 10g is transparent to OID database (it talks to OID ldap server) so no changes required at OAM side.

In 11g R2 RAC, there is SCAN listener so use this listener for connection from OID server to database.

To convert OID database from single node to RAC instead of export/import , I’ll use this

1. Install Grid Infrastructure
2. Relink non-rac database with RAC ON option

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk rac_on
make -f ins_rdbms.mk ioracle

3. Add database to grid infrastructure
4. tnsnames.ora in OID with scan name and port

If this is OID 11g then also create multi datasource for DIP/ODSM and reconfigure ODSM/DIP to use Multi data source.

Get this verified by Oracle Support.

Reply
cristiano says June 4, 2011

if i want to use Data Pump is it enough to export only the SCHEMA ODS and ODSSM in the new RAC database ?

Reply
Elvis says May 29, 2015

Hello,

How can you register Oracle Data Guard ( Primary- and Standby Database ) in Oracle Internet Directory?

Can someone help me ?

Reply
    Atul Kumar says May 29, 2015

    @Elvis,
    Do you mean you wish to configure data guard for OID database ? If yes treat OID database as normal other database and use same steps as you do to configure dataguard. Do you need steps to configure dataguard ?

    Reply
Add Your Reply