Sun Cluster Geographic Edition Data Replication Guide for Oracle Data Guard

ProcedureHow to Configure the Primary Database Listener and Naming Service

  1. Create a static listener for Oracle Data Guard.


    Note –

    Perform this step on all cluster-paris 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-PARIS-1 and (SID_NAME = sales1) lines vary from node to node, while the (GLOBAL_DBNAME=sales_DGMGRL) differs on cluster-newyork. Later, you will add these entries on the cluster-newyork nodes.


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

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


    oracle (phys-paris-1)$ lsnrctl stop LISTENER_PHYS_PHYS-PARIS-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-PARIS-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 "sales" has 2 instance(s).
      Instance "sales1", status READY, has 2 handler(s) for this service...
      Instance "sales2", status READY, has 1 handler(s) for this service...
    Service "salesXDB" has 2 instance(s).
      Instance "sales1", status READY, has 1 handler(s) for this service...
      Instance "sales2", status READY, has 1 handler(s) for this service...
    Service "sales_DGB" has 2 instance(s).
      Instance "sales1", status READY, has 2 handler(s) for this service...
      Instance "sales2", status READY, has 1 handler(s) for this service...
    Service "sales_DGMGRL" has 1 instance(s).
      Instance "sales1", status UNKNOWN, has 1 handler(s) for this service...
    Service "sales_XPT" has 2 instance(s).
      Instance "sales1", status READY, has 2 handler(s) for this service...
      Instance "sales2", 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-paris cluster only. Also, add entries for the standby (salesdr) database instances that you create later when you modify the pfile parameter file. In the example, the sales database dynamically registers a service name of sales with the listeners (see the database service_names initialization parameter).


    oracle (phys-paris-1)$ cat ${ORACLE_HOME}/network/admin/tnsnames.ora
    SALES1-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-1-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = sales)
          (INSTANCE_NAME = sales1)
        )
      )
    
    SALES2-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-2-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = sales)
          (INSTANCE_NAME = sales2)
        )
      )
    
    SALES-SVC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-1-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
          (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-2-crs)(PORT = 1521)
          (SEND_BUF_SIZE = 65535)(RECV_BUF_SIZE = 65535))
          (LOAD_BALANCE = yes)
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = sales)
        )
      )
    
    LISTENERS_SALES =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-1-crs)(PORT = 1521))
        (ADDRESS = (PROTOCOL = TCP)(HOST = phys-paris-2-crs)(PORT = 1521))
      )