Sun Cluster Geographic Edition Data Replication Guide for Oracle Data Guard

ProcedureHow to Configure the Standby Database Listener and Naming Service

  1. Create a static listener for Oracle Data Guard.


    Note –

    Perform this step on all cluster-newyork nodes.


    Oracle Data Guard requires that you configure a static listener. The following example uses ${ORACLE_HOME}=/oracle/oracle/product/10.2.0/db_1 and shows where to add the entry for the static listener in the ${ORACLE_HOME}/network/admin/listener.ora file. The SID_LIST_LISTENER_PHYS-NEWYORK-1 and (SID_NAME = salesdr1) lines vary from node to node, while the (GLOBAL_DBNAME=salesdr_DGMGRL) differs on cluster-paris.


    oracle (phys-newyork-1)$ cat ${ORACLE_HOME}/network/admin/listener.ora
    SID_LIST_LISTENER_PHYS-NEWYORK-1 =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (SID_NAME = salesdr1)
          (GLOBAL_DBNAME=salesdr_DGMGRL)
          (ORACLE_HOME = /oracle/oracle/product/10.2.0/db_1)
        )
      )
    oracle (phys-newyork-1)$
  2. Restart the listener.

    To enable the static entries, restart the Oracle listener processes on each of the nodes on cluster-newyork.


    oracle (phys-newyork-1)$ lsnrctl stop LISTENER_PHYS_PHYS-NEWYORK-1
    LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 29-OCT-2008 02:04:56
    
    Copyright (c) 1991, 2006, Oracle.  All rights reserved.
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    The command completed successfully
    oracle$ lsnrctl start LISTENER_PHYS_PHYS-NEWYORK-1
    LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 29-OCT-2008 02:05:04
    
    Copyright (c) 1991, 2006, Oracle.  All rights reserved.
    
    Starting /oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
    
    TNSLSNR for Solaris: Version 10.2.0.3.0 - Production
    …
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "salesdr" has 2 instance(s).
      Instance "salesdr1", status READY, has 2 handler(s) for this service...
      Instance "salesdr2", status READY, has 1 handler(s) for this service...
    Service "salesdrXDB" has 2 instance(s).
      Instance "salesdr1", status READY, has 1 handler(s) for this service...
      Instance "salesdr2", status READY, has 1 handler(s) for this service...
    Service "salesdr_DGB" has 2 instance(s).
      Instance "salesdr1", status READY, has 2 handler(s) for this service...
      Instance "salesdr2", status READY, has 1 handler(s) for this service...
    Service "salesdr_DGMGRL" has 1 instance(s).
      Instance "salesdr1", status UNKNOWN, has 1 handler(s) for this service...
    Service "salesdr_XPT" has 2 instance(s).
      Instance "salesdr1", status READY, has 2 handler(s) for this service...
      Instance "salesdr2", status READY, has 1 handler(s) for this service...
    The command completed successfully
  3. Verify the net service naming entries for all database instances.

    Ensure that the naming service method that you are using, either tnsnames.ora or the directory service, has entries defined for all the Oracle database instances. The following example shows the type of entries that you include for the cluster-newyork cluster only. In the example, the salesdr database dynamically registers a service name of salesdr with the listeners (see the database service_names initialization parameter).


    oracle (phys-newyork-1)$ cat ${ORACLE_HOME}/network/admin/tnsnames.ora
    SALESDR1-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-1-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = salesdr)
          (INSTANCE_NAME = salesdr1)
        )
      )
    
    SALESDR2-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-2>-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = salesdr)
          (INSTANCE_NAME = salesdr2)
        )
      )
    
    SALESDR-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-1-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-2-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
          (LOAD_BALANCE = yes)
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = salesdr)
        )
      )
    
    LISTENERS_SALESDR =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-1-crs)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = phys-newyork-2-crs)(PORT = 1521))
      )
  4. Verify that the standby listener listener.ora and tnsnames.ora files have the correct entries, and restart the listener process.

    Ensure that these files include the static Oracle Data Guard listener entry and the naming service entries for the primary and standby cluster database service. If you are not using the Oracle directory naming service lookup, you need to include the entries in tnsnames.ora.


    oracle (phys-newyork-1)$ lsnrctl stop LISTENER_PHYS-NEWYORK-1
    LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 29-OCT-2008 02:04:56
    
    Copyright (c) 1991, 2006, Oracle.  All rights reserved.
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    The command completed successfully
    oracle$ lsnrctl start LISTENER_PHYS-NEWYORK-1
    LSNRCTL for Solaris: Version 10.2.0.3.0 - Production on 29-OCT-2008 02:05:04
    
    Copyright (c) 1991, 2006, Oracle.  All rights reserved.
    
    Starting /oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
    
    TNSLSNR for Solaris: Version 10.2.0.3.0 - Production
    …
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "salesdr_DGMGRL" has 1 instance(s).
      Instance "salesdr1", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully