Sun Cluster Geographic Edition 数据复制指南(适用于 Oracle Data Guard)

Procedure如何配置主数据库侦听器和命名服务

  1. 为 Oracle Data Guard 创建静态侦听器。


    注 –

    请在所有 cluster-paris 节点上执行此步骤。


    Oracle Data Guard 要求您配置静态侦听器。下面的示例使用 ${ORACLE_HOME}=/oracle/oracle/product/10.2.0/db_1,并说明在 ${ORACLE_HOME}/network/admin/listener.ora 文件中的什么位置添加静态侦听器的对应条目。SID_LIST_LISTENER_PHYS-PARIS-1(SID_NAME = sales1) 行因节点而异,而 (GLOBAL_DBNAME=sales_DGMGRL)cluster-newyork 上有所不同。稍后,您将在 cluster-newyork 节点上添加这些条目。


    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. 重新启动侦听器。

    要启用这些静态条目,请在 cluster-paris 中的每个节点上重新启动 Oracle 侦听器进程。


    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. 检验所有数据库实例的 net 服务命名条目。

    确保您所使用的命名服务方法(tnsnames.ora 或目录服务)为所有 Oracle 数据库实例均定义了相应的条目。下面的示例仅显示针对 cluster-paris 群集的条目类型。此外,还应在修改 pfile 参数文件时,为您稍后创建的备用 (salesdr) 数据库实例添加相应的条目。在本示例中,sales 数据库动态地向侦听器注册一个服务名 sales(请参见数据库的 service_names 初始化参数)。


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