Pages

Sunday, April 8, 2012

Centralized TNS Management

Oracle Internet Directory (OID) can be used to configure Oracle Net Services at no cost. It is now part of Oracle Identity Management Suite. This procedure simplifies the DBA life to manage service names centrally without installing the full suite.

Install Oracle Database with AL32UTF8 character set encoding.
Download Oracle Identity Management 11gR1 (11.1.1.6.0).
Start the installer.
$ ./runInstaller
In Welcome screen, click Next
In Install Software Updates screen, Select Skip software updates.
In Select Installation Type screen, Select Install and Configure option.
In Prerequisite Checks screen, Ensure that all prerequisites are met.
In Select Domain screen, Select Configure Without A Domain.

In Specify Installation Location screen, Specify the Oracle Middleware Home Location as /home/oracle/Middleware, Oracle Home Directory as Oracle_IDM1, Oracle Instance Location as /home/oracle/Middleware/asinst_1, and Oracle Instance Name as asinst_1.

In Configure Components screen, make sure only Oracle Internet Directory option is selected.

In Configure Ports screen, Select Auto Port Configuration. It uses ports 3060 and 3131 for OID server.
Select Create Schema, enter the database connection information in the Connect String field, enter SYS in the User Name field and enter password for SYS in Password field to create ODS schema.

In OID Passwords screen, provide password in ODS Schema Password field for other operations. Also provide password in ODSSM Schema Password field for system management tools (not for OID usage).

In Specify OID Adminstrator Password screen, Enter the location for Realm as dc=example,dc=com and provide the password for OID Administrator.

In Installation Summary screen, Click Install to begin the installation.


Next, Import TNS entries into OID (LDAP) via Oracle Net Manager after configuring the client.
Expand Service Naming
In Directory Server Authentication, enter user as cn=orcladmin and the password you
Command->Directory->Export Net Service Names

Select one or more of the net services names to migrate into the directory server.
Choose a directory naming context as <Directory Root>
Choose the Oracle Context as cn=OracleContext,dc=example,dc=com

To search the entries in LDAP
$ ldapsearch -h localhost -p 3060 -D cn=orcladmin -w password -b "cn=OracleContext,dc=example,dc=com" -s one "objectclass=orclNetService" orclnetdescstring

To start OID
$ /home/oracle/Middleware/asinst_1/bin/opmnctl startall
To stop OID
$ /home/oracle/Middleware/asinst_1/bin/opmnctl stopall

Client Configuration

ldap.ora tells to your Oracle client what OID server is called and which port it is listening on. If more than one OID server is running, simply comma separate the host names.

DIRECTORY_SERVERS=(oidserv1:3060:3131,oidserv2:3060:3131)
DEFAULT_ADMIN_CONTEXT="dc=example,dc=com"
DIRECTORY_SERVER_TYPE=OID

Configure sqlnet.ora to use ldap for TNS name resolution.

NAMES.DIRECTORY_PATH=(LDAP,TNSNAMES)