Skip Headers

Oracle9i Real Application Clusters Real Application Clusters Guard I - Concepts and Administration
Release 2 (9.2)

Part Number A96601-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

7
Configuring the Network for Oracle Real Application Clusters Guard

This chapter describes how to configure the Oracle network for Oracle Real Application Clusters Guard. It contains the following sections:

Configuring the Oracle Network

The following network configurations can be used with Oracle Real Application Clusters Guard:

These options are supported with Oracle Real Application Clusters Guard, but you must configure them according to the guidelines in this chapter. The decision about which type of connection to use depends on the resources available, as well as application and business needs.

See Also:

Oracle Net Services Administrator's Guide

Dedicated Server Connections

Dedicated server environments do not have cross-instance listener registration. A connection request made to a specific instance's listener can be connected only to that instance's service. When the primary instance fails, the re-connection request from the client is rejected by the failed instance's listener. Oracle Real Application Clusters Guard stops the failed instance's listener and the IP address to which it was listening. Oracle Real Application Clusters Guard then restarts the IP address on the node where the secondary instance performs recovery and becomes the primary instance. When the client resubmits the request, the client re-establishes the connection by using the new primary instance's listener that then connects the client to the new primary instance.

Oracle Real Application Clusters Guard uses the LOCAL_LISTENER initialization parameter to specify the network name that resolves to an address of Oracle Net local listeners (listeners that are running on the same machine as the instance). The address is specified in the tnsnames.ora file.

For example, if the LOCAL_LISTENER initialization parameter is set to listener_SALES_HOSTA, and listener_SALES_HOSTA uses TPC/IP on port 1421, then the entry in the tnsnames.ora.ded.pfs file looks like this:

listener_SALES_HOSTA=
    (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1421))

Note:

The HOST is defined to be the relocatable IP address.


Example of an Oracle Real Application Clusters Guard Dedicated Network Configuration

Suppose an Oracle Real Application Clusters Guard environment called SALES exists as described in the following table.

Environment Component Node 1 Node 2

ORACLE_SERVICE (database)

SALES

SALES

ORACLE_SID (instance)

SALES1

SALES2

Listener

SALES_HOSTA_LSNR

SALES_HOSTB_LSNR

Relocatable IP address

144.25.28.74

144.25.28.75

Configure the LOCAL_LISTENER parameter to allow for service registration. Then the following parameters are defined as shown in the following table.

Parameter Node 1 Node 2

SERVICE_NAME

SALES.ORACLE.COM

SALES.ORACLE.COM

INSTANCE_NAME

SALES1

SALES2

LOCAL_LISTENER

listener_SALES_HOSTA

listener_SALES_HOSTB

The values of the LOCAL_LISTENER parameter can be resolved through the local tnsnames.ora files on Nodes 1 and 2, respectively:

listener_SALES_HOSTA=
    (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1421))

listener_SALES_HOSTB=
    (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1421))

The following actions result from this configuration:

  1. The PMON process for instance SALES1 registers with listener SALES_HOSTA_LSNR.

    The PMON process for instance SALES2 registers with listener SALES_HOSTB_LSNR.

    You can confirm this by asking for a services summary on each node:

    LSNRCTL> services SALES_HOSTA_LSNR
    
    

    You should see output similar to the following:

    Connecting to 
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1421)
    Services Summary...
    Service "sales.oracle.com"               has 1 instances.
      Instance "SALES1"
       Status: READY  Total handlers: 1  Relevant handlers: 1
        DEDICATED established:6 refused:0 current:0 max:0 state:ready
         Session: NS
    
    

    To get a services summary on HOSTB, enter the following command:

    LSNRCTL> services SALES_HOSTB_LSNR
    
    

    You should see output similar to the following:

    Connecting to 
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1421)
    Services Summary...
    Service "sales.oracle.com"               has 1 instances.
      Instance "SALES2"
       Status: READY/SECONDARY Total handlers: 1  Relevant handlers: 1
         DEDICATED established:11 refused:0 current:0 max:0 state:ready
          Session: NS
    
    
  2. The client requests a connection.

    The connect descriptor contains addresses of listeners located on 144.25.28.74 and 144.25.28.75 that listen for connection requests for a database service called SALES.ORACLE.COM with a primary instance role.

    The connect descriptor address list features connect-time failover and no client load balancing. Connect-time failover is enabled by setting FAILOVER=ON. When set to ON, the FAILOVER parameter instructs Oracle Net at connect time to fail over to 144.25.28.75 if the first address, 144.215.28.74, fails. The FAILOVER parameter defaults to ON for description lists, descriptions, and address lists.

    The SALES_DED net service name enables connections to the instance with the primary instance role. The SERVER=DEDICATED specification forces a dedicated server connection.

    Specify the SALES_DED net service name as follows:

    SALES_DED=
     (DESCRIPTION=
        (LOAD_BALANCE=OFF)
        (ADDRESS_LIST=
         (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1421))
         (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1421)))
       (CONNECT_DATA=
         (SERVICE_NAME=SALES.ORACLE.COM)
         (SERVER=DEDICATED)
         (INSTANCE_ROLE=PRIMARY)))
    
    
  3. The listener receives the request and directs it to the appropriate server.
  4. The connection is accepted by the server.

    See Also:

    Oracle Net Services Administrator's Guide

Shared Server Connections

Dynamic service registration relies on the PMON process to register instance information with a listener, as well as the current state and load of the instance and shared server dispatchers. The registered information enables the listener to forward client connection requests to the appropriate service handler.

In Oracle Real Application Clusters Guard, the LISTENER attribute in the DISPATCHER initialization parameter has been configured to allow for dynamic service registration of information to both listeners, also referred to as cross-instance listener registration. The primary instance registers with the primary instance listener as well as the secondary instance listener. This enables the primary instance to accept connections from its local listener, as well as from the secondary instance listener. A secondary instance registers with its local listener as a secondary instance.

Example of an Oracle Real Application Clusters Guard Shared Server Connection

Suppose that an Oracle Real Application Clusters Guard environment called SALES exists as described in the following table.

Environment Component Node 1 Node 2

ORACLE_SERVICE

SALES

SALES

ORACLE_SID (instance)

SALES1

SALES2

Listener

SALES_HOSTA_LSNR

SALES_HOSTB_LSNR

Relocatable IP address

144.25.28.74

144.25.28.75

Define the DISPATCHERS initialization parameter on each node:

The listener value (listener_SALES) can then be resolved through a local tnsnames.ora file on both servers as follows, assuming that the listener alias name is listener_SALES and the two ports are 1526:

listener_SALES=
DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1526))
(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1526))

The following actions result from this configuration:

  1. Each dispatcher listens on the address assigned to it.
  2. The PMON processes for the SALES1 and SALES2 instances register with both listeners. The listeners are updated dynamically with information about the load of the instances and dispatchers. You can confirm this by asking for a services summary on each node. Enter the following command:
    $ lsnrctl
    
    

    You should see output similar to the following:

    LSNRCTL for Solaris: Version 9.0.1.0.0 - Production on 03-JAN-2001 13:54:16
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    
    Welcome to LSNRCTL, type "help" for information.
    
    

    Enter the following command:

    LSNRCTL> set display normal
    
    

    You should see output similar to the following:

    Service display mode is NORMAL
    
    

    Enter the following command:

    LSNRCTL> services SALES_HOSTA_LSNR
    
    

    You should see output similar to the following:

    Connecting to 
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1526)(QUEUESIZE
    =1024)))
    Services Summary...
    Service "sales.oracle.com"               has 2 instances.
        Instance "sales1"
          Status: READY  Total handlers: 1  Relevant handlers: 1
            D000 established:3 refused:0 current:0 max:1022 state:ready
            (ADDRESS=(PROTOCOL=tcp)(HOST=144.25.28.74)(PORT=60349))
                Session: NS
        Instance "sales2"
          Status: READY/SECONDARY  Total handlers: 1  Relevant handlers: 1
            D000 established:0 refused:0 current:0 max:1022 state:ready
            (ADDRESS=(PROTOCOL=tcp)(HOST=144.25.28.75)(PORT=60858))
                Session: NS
    The command completed successfully
    
    
  3. The client requests a connection.

    The connect descriptors list specifies connect-time failover and no client load balancing. At connection time, Oracle Net fails over to 144.25.28.75 if the first address, 144.215.28.74, fails.

    The SALES_MTS net service name enables connections to the instance with the primary instance role.

    If a shared server is specified and a client connection request arrives when no dispatchers are registered, then the request can be handled by a dedicated server process. Oracle Real Application Clusters Guard forces clients to always use a dispatcher because SERVER=SHARED is configured in the connect data portion of the connect descriptor. If a dispatcher is not available, then the client connection request is rejected.

    The client connect descriptor uses an address list that contains the listener addresses for the primary instance and the secondary instance. The LOAD_BALANCE parameter is set to OFF because all client connections should go to the primary instance.

    For example, define SALES_MTS as follows:

    SALES_MTS=
      (DESCRIPTION=
    (LOAD_BALANCE=OFF)
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1526))
    (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1526)))
    (CONNECT_DATA=
    (SERVICE_NAME=SALES.ORACLE.COM)
    (SERVER=SHARED) (INSTANCE_ROLE=PRIMARY)))
  4. The listener receives the connection request and determines whether the client's request can be serviced. If not, the listener refuses the network connection request.
  5. If the client's request is valid, then the listener performs one of the following actions:
    • The listener hands the connection request directly to a dispatcher.
    • The listener issues a redirect message to the client. The message contains the network address of a dispatcher. The client then dissolves the network session to the listener and establishes a network session to the dispatcher by using the network address provided in the message. The listener then directs the client's request to the appropriate server.

Transparent Application Failover Dedicated Connections

Transparent application failover (TAF) instructs Oracle Net to fail over an established connection to a different listener. This enables the user to continue to work, by using the new connection as if the original connection had not failed. Using TAF requires manual configuration of a net service name that includes the FAILOVER_MODE parameter in the CONNECT_DATA portion of the connect descriptor.

This section includes the following topics:

TAF Basic Dedicated Connections

In this example of a TAF basic dedicated connection, the TAF application first tries to connect to the 144.25.28.74 IP address. If it cannot connect, then it attempts to perform a connect-time failover to 144.25.27.75. If the instance fails after the connection, then the TAF application fails over to the other node's listener, reserving SELECT statements that are in progress. If the failover connection attempt fails, then Oracle Net waits 5 seconds before trying to connect again. Oracle Net attempts to connect up to 180 times.

Specify a TAF basic dedicated connection for the SALES database as follows:

SALES_DED_BASIC=
  (DESCRIPTION=
     (LOAD_BALANCE=OFF)
     (FAILOVER=ON)
     (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1524))
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1524)))
     (CONNECT_DATA=
        (SERVICE_NAME=SALES.ORACLE.COM)
        (SERVER=DEDICATED)
        (INSTANCE_ROLE=PRIMARY)
        (FAILOVER_MODE=
             (BACKUP=SALES_DED_BASIC_BACKUP)
             (TYPE=SELECT)
             (METHOD=BASIC)
             (RETRIES=180)
             (DELAY=5))))

SALES_DED_BASIC_BACKUP=
  (DESCRIPTION=
     (LOAD_BALANCE=OFF)
     (FAILOVER=ON)
     (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1524))
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1524)))
     (CONNECT_DATA=
        (SERVICE_NAME=SALES.ORACLE.COM)
        (SERVER=DEDICATED)
        (INSTANCE_ROLE=PRIMARY)
        (FAILOVER_MODE=
             (BACKUP=SALES_DED_BASIC)
             (TYPE=SELECT)
             (METHOD=BASIC)
             (RETRIES=180)
             (DELAY=5))))

TAF Preestablished Dedicated Connections

When TAF is configured, a backup connection can be preestablished to the secondary instance. The initial and backup connections are specified explicitly. In the following example, Oracle Net connects to the listener on HOSTA and establishes a preconnection to HOSTB, the secondary instance. If HOSTA fails after the connection, then the TAF application fails over to HOSTB. The RETRIES and DELAY parameters cause Oracle Net to automatically try to connect again if the first connection attempt fails.

In the following example of a TAF preestablished dedicated connection, the TAF application tries to connect to the 144.25.28.74 address first. If it cannot, then Oracle Net attempts connect-time failover to 144.25.27.75. A backup connection is preestablished. If the instance fails after the connection, then the TAF application fails over to the other node's listener, reserving any SELECT statements in progress. If the failover connection attempt fails, then Oracle Net waits 5 seconds before trying to connect again. Oracle Net attempts to connect up to 180 times.

Define a TAF preestablished dedicated connection for the SALES database as follows:

SALES_DED_PRE=
  (DESCRIPTION=
     (LOAD_BALANCE=OFF)
     (FAILOVER=ON)
     (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1524))
        (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1524)))
     (CONNECT_DATA=
        (SERVICE_NAME=SALES.ORACLE.COM)
        (SERVER=DEDICATED)
        (INSTANCE_ROLE=PRIMARY)
        (FAILOVER_MODE=
            (BACKUP=SALES_DED_PRE_SECONDARY)
            (TYPE=SELECT)
            (METHOD=PRECONNECT)
            (RETRIES=180)
            (DELAY=5))))

SALES_DED_PRE_SECONDARY=
  (DESCRIPTION=
     (LOAD_BALANCE=OFF)
     (FAILOVER=ON)
     (ADDRESS_LIST=
          (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.75)(PORT=1524))
          (ADDRESS=(PROTOCOL=TCP)(HOST=144.25.28.74)(PORT=1524)))
     (CONNECT_DATA=
          (SERVICE_NAME=SALES.ORACLE.COM)
     (SERVER=DEDICATED)
     (INSTANCE_ROLE=SECONDARY)
     (FAILOVER_MODE=
         (BACKUP=SALES_DED_PRE)
         (TYPE=SELECT)
         (METHOD=PRECONNECT)
         (RETRIES=48)
         (DELAY=900))))


Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback