How to Setup EUS and TNS for Failover Configuration of Oracle Dataguard with Primary and Standby Hosts (Doc ID 2224611.1) | 编辑To Bottom |
In this Document
APPLIES TO:Oracle Unified Directory - Version 11.1.2.3.0 and laterAdvanced Networking Option - Version 11.2.0.3 and later Oracle Internet Directory - Version 11.1.1.9.0 and later Information in this document applies to any platform. GOALTo implement EUS in a Data Guard with Primary/Standby database and create TNS aliases for failover SOLUTIONPurposeThe purpose of this article is to explain how to configure Enterprise User Security (EUS) with a TNS connect string to work correctly with Data Guard with Primary/Standby databases on different physical hosts connecting to a directory server (OUD or OID). ScopeIntegration with EUS, 11g and 12c Oracle Databases, and OUD or OID. The features described in this article applies to OUD 11gR2PS3 or OID 11gR1PS7 and onwards. DetailsProblem 2) Create global schema for both databases. 2.1) Create schema mapping within an enterprise domain in the (OUD/OID) directory. 3) Create global roles in both databases and grant privileges to them. 3.1) Create enterprise roles in (OUD/OID) and assign primary and standby databases to both of them. 3.2) Grant enterprise roles to LDAP groups in (OUD/OID). 4) Test EUS, connecting to each of databases using registered service names from primary or secondary databases. 5) Create an additional TNS entry for failover mechanism as follows -
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ) ) Note: This is an example of a configuration and the service name might be different on each server. Add the following Failover entry to tnsnames.ora DB11G= (DESCRIPTION_LIST= (FAILOVER=true) (LOAD_BALANCE=false) (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST= (CONNECT_DATA= (SERVICE_NAME= ) (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST= (CONNECT_DATA= (SERVICE_NAME= ) ) This entry can be exported to OUD using either "netmgr" or enterprise manager .
Choose the TNS name "DB11g" to be exported to OUD In Directory (OUD or OID) find the corresponding entries as follows: dn: cn= orclNetDescString: (DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= ) objectClass: orclNetService objectClass: top cn: orclNetDescName: 000:cn=DESCRIPTION_LIST_0 dn: cn=DESCRIPTION_LIST_0,cn= orclNetDescList: 000:cn=DESCRIPTION_0 orclNetDescList: 001:cn=DESCRIPTION_1 orclVersion: v0.0 objectClass: orclNetDescriptionList objectClass: top orclNetShared: NO cn: DESCRIPTION_LIST_0 dn: cn=DESCRIPTION_0,cn=DESCRIPTION_LIST_0,cn= orclNetServiceName: orclVersion: v0.0 objectClass: orclNetDescriptionAux1 objectClass: orclNetDescription objectClass: top orclNetLoadBalance;binary: NO orclNetAddrList: 000:cn=ADDRESS_LIST_0 orclNetShared: NO cn: DESCRIPTION_0 dn: cn=ADDRESS_LIST_0,cn=DESCRIPTION_0,cn=DESCRIPTION_LIST_0,cn= orclNetSourceRoute;binary: NO orclNetFailover;binary: YES orclVersion: v0.0 objectClass: orclNetAddressList objectClass: top orclNetLoadBalance;binary: NO orclNetAddrList: 000:cn=ADDRESS_0 orclNetShared: NO cn: ADDRESS_LIST_0 dn: cn=ADDRESS_0,cn=ADDRESS_LIST_0,cn=DESCRIPTION_0,cn=DESCRIPTION_LIST_0,cn= orclNetProtocol: TCP orclVersion: v0.0 objectClass: orclNetAddress objectClass: top orclNetShared: NO cn: ADDRESS_0 orclNetAddressString: (ADDRESS=(PROTOCOL=TCP)(HOST= dn: cn=DESCRIPTION_1,cn=DESCRIPTION_LIST_0,cn= orclNetServiceName: orclVersion: v0.0 objectClass: orclNetDescriptionAux1 objectClass: orclNetDescription objectClass: top orclNetLoadBalance;binary: NO orclNetAddrList: 000:cn=ADDRESS_LIST_0 orclNetShared: NO cn: DESCRIPTION_1 dn: cn=ADDRESS_LIST_0,cn=DESCRIPTION_1,cn=DESCRIPTION_LIST_0,cn= orclNetSourceRoute;binary: NO orclNetFailover;binary: YES orclVersion: v0.0 objectClass: orclNetAddressList objectClass: top orclNetLoadBalance;binary: NO orclNetAddrList: 000:cn=ADDRESS_0 orclNetShared: NO cn: ADDRESS_LIST_0 dn: cn=ADDRESS_0,cn=ADDRESS_LIST_0,cn=DESCRIPTION_1,cn=DESCRIPTION_LIST_0,cn= orclNetProtocol: TCP orclVersion: v0.0 objectClass: orclNetAddress objectClass: top orclNetShared: NO cn: ADDRESS_0 orclNetAddressString: (ADDRESS=(PROTOCOL=TCP)(HOST=
6) Test the new TNS entry or log on to database # tnsping # sqlplus 7) Failover can be tested by stopping the primary server. Current and new sessions will automatically switch to the failover server on (in this example) |