LOAD_BALANCE=false 主在不会切换备

How to Setup EUS and TNS for Failover Configuration of Oracle Dataguard with Primary and Standby Hosts (Doc ID 2224611.1) ​编辑To Bottom

LOAD_BALANCE=false 主在不会切换备_第1张图片


LOAD_BALANCE=false 主在不会切换备_第2张图片

In this Document

Goal
Solution
Purpose
Scope
Details
References

APPLIES TO:

Oracle Unified Directory - Version 11.1.2.3.0 and later
Advanced 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.

GOAL

 To implement EUS in a Data Guard with Primary/Standby database and create TNS aliases for failover

SOLUTION

Purpose

The 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).

Scope

Integration 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.

Details

Problem
-------
EUS does not include the functionality to create TNS entries for a failover configuration, and there is no other Product Documentation explaining how to setup EUS for such an environment.

Solution
--------
1) Register both primary and standby databases in the Directory (OUD or OID) as individual databases.

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 -


TNS entries in tnsnames.ora for primary and standby databases  :

=

   (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      (CONNECT_DATA =

       (SERVER = DEDICATED)

       (SERVICE_NAME = )

   )

)

=

   (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      (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=) (PORT=))

           (CONNECT_DATA=

           (SERVICE_NAME=))

     )

     (DESCRIPTION=

          (ADDRESS= (PROTOCOL=TCP) (HOST=) (PORT=))

          (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=,cn=OracleContext,dc=

orclNetDescString: (DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=)))(CONNECT_DATA=(SERVICE_NAME=)))(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=)))(CONNECT_DATA=(SERVICE_NAME=)))

)

objectClass: orclNetService

objectClass: top

cn:

orclNetDescName: 000:cn=DESCRIPTION_LIST_0

dn: cn=DESCRIPTION_LIST_0,cn=,cn=OracleContext,dc=

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=,cn=OracleContext,dc=

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=,cn=OracleContext,dc=

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=,cn=OracleContext,dc=

orclNetProtocol: TCP

orclVersion: v0.0

objectClass: orclNetAddress

objectClass: top

orclNetShared: NO

cn: ADDRESS_0

orclNetAddressString: (ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=))

dn: cn=DESCRIPTION_1,cn=DESCRIPTION_LIST_0,cn=,cn=OracleContext,dc=

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=,cn=OracleContext,dc=

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=,cn=OracleContext,dc=

orclNetProtocol: TCP

orclVersion: v0.0

objectClass: orclNetAddress

objectClass: top

orclNetShared: NO

cn: ADDRESS_0

orclNetAddressString: (ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=))


 

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)

你可能感兴趣的:(oracle)