RAC DATAGUARD primary listener

原创 2015年11月21日 18:08:46

这一步最为关键,一定要设置成静态监听,因为动态监听在rman连接时监听状态会立马变成locked,静态监听的状态一般是UNKNOWN

Service "PRODS" has 1instance(s).

 Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

然后监听这块有问题的话一定会报下面的的错:

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=54 instance=PROD1device type=DISK

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

RMAN-00571:===========================================================

RMAN-03002: failure of Duplicate Db commandat 10/21/2015 16:54:08

RMAN-05501: aborting duplication of targetdatabase

RMAN-03015: error occurred in stored scriptMemory Script

RMAN-03009: failure of backup command onORA_DISK_1 channel at 10/21/2015 16:54:08

ORA-17629: Cannot connect to the remotedatabase server

ORA-17627: ORA-12514: TNS:listener does not currently know ofservice requested in connect descriptor

ORA-17629: Cannot connect to the remote database server

 

RMAN>

下面的lsnrctl status 报错要去查看service name和参数文件是否一致

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2/db_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/node2/listener/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node2)(PORT=1521)))

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

The listener supports no services

The command completed successfully

[oracle@node2 admin]$

 

主库:

主库的监听是grid在管理,但tns会在oracle下

[oracle@node1 ~]$ cd$ORACLE_HOME/network/admin

[oracle@node1 admin]$ pwd

/u01/oracle/product/11.2.0/network/admin

[oracle@node1 admin]$ ll

total 12

drwxr-xr-x 2 oracle oinstall 4096 Oct 1514:40 samples

-rw-r--r-- 1 oracle oinstall  205 May 11 2011 shrept.lst

-rw-r----- 1 oracle oinstall 835 Oct 21 17:44 tnsnames.ora

[oracle@node1 admin]$

其实就是这么个东西,我们打开看一下:

[oracle@node1 admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File:/u01/oracle/product/11.2.0/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

PROD =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = node-scan)(PORT = 1521))

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = PROD)

    )

  )

 

 

 

PROD2 =

 (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = PRODS)

    )

  )

 

PROD1 =

 (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = PROD)

    )

  )

 

 

PRODS =

 (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = PRODS)

    )

  )

[oracle@node1 admin]$

 

我们再去grid下面看真正的监听

[grid@node1 ~]$ cd$ORACLE_HOME/network/admin

[grid@node1 admin]$ pwd

/u01/11.2.0/ghome/network/admin

[grid@node1 admin]$

[grid@node1 admin]$ ll

total 32

-rw-r--r-- 1 grid oinstall 183 Oct 15 14:17 endpoints_listener.ora

-rw-r--r-- 1 grid oinstall 645 Oct 21 15:48 listener.ora

-rw-r--r-- 1 grid oinstall  184 Oct 15 14:09 listener.ora.bak.node1

drwxr-xr-x 2 grid oinstall 4096 Oct 1513:20 samples

-rw-r--r-- 1 grid oinstall  205 May 11 2011 shrept.lst

-rw-r--r-- 1 grid oinstall  215 Oct 19 10:33 sqlnet15101910AM3344.bak

-rw-r--r-- 1 grid oinstall  215 Oct 15 14:17 sqlnet.ora

-rw-r--r-- 1 grid oinstall 315 Oct 19 10:34 tnsnames.ora

[grid@node1 admin]$

这里面的tnsname.ora没什么东西,估计是连接自己的库用的

我们看一下就知道了

[grid@node1 admin]$ cat tnsnames.ora

# tnsnames.ora.node1 Network ConfigurationFile: /u01/11.2.0/ghome/network/admin/tnsnames.ora.node1

# Generated by Oracle configuration tools.

 

PROD =

 (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = PROD)

    )

  )

 

[grid@node1 admin]$

下面我们看listener.ora

[grid@node1 admin]$ cat listener.ora

# listener.ora Network Configuration File:/u01/11.2.0/ghome/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1= ON

 

SID_LIST_LISTENER =

  (SID_LIST=

   (SID_DESC =

     (GLOBAL_DBNAME = PROD1)

     (ORACLE_HOME = /u01/11.2.0/ghome)

     (SID_NAME = PROD)

    )

  )

 

LISTENER =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))

  )

 

ADR_BASE_LISTENER = /u01/11.2.0/gbase

 

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER= ON

 

LISTENER_SCAN1 =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))

  )

 

ADR_BASE_LISTENER_SCAN1 = /u01/11.2.0/gbase

 

[grid@node1 admin]$

注:这个监听是安装建库时oracle自己建立的,但我后来有手动添加了静态监听,方法如下:

当然我们可以先netca

[grid@node1 admin]$ netmgr



点击你的监听配置,然后选择database services

这里Global Database Name 即是你的实例名


SID就是你的库名喽


当然上面的监听你还要注意这么一句

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER= ON

[grid@node1 admin]$ catendpoints_listener.ora

LISTENER_NODE1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node1vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.10)(PORT=1521)(IP=FIRST))))                   # line added by Agent

[grid@node1 admin]$

这也是grid监听重要的一部分




版权声明:本文为博主原创文章,未经博主允许不得转载。

Configuring Oracle 11.2.0.3 3-Nodes RAC Primary to 2-Nodes RAC Physical Standby DataGuard on OL

操作环境 Primary Standby Clusterware 11.2.0.3 Grid Infrastructure ...

Script to Collect Data Guard Primary Site Diagnostic Information for Version 10g and above(+RAC)

-- NAME: new_dg_prim_diag.sql  (Run from sqlplus on PRIMARY with a LOGICAL or PHYSICAL STANDBY as SY...

Oracle11gR2 RAC primary+Single standby DG配置实践

很久之前做的实验,今天在CSDN存档一下: 说明: RAC primary和Single standby配置 2节点RAC和1个single instance组成的data guard环境。...

RAC primary+Single standby日志传输错误一则

环境: 最近用grid control部署了一套RAC primary+Single standby环境,如下 角色 实例名 IP 主集群数据库1 racdb_racdb1 192.168.2....

【转】双机/RAC/Dataguard的区别

Data Guard 是Oracle的远程复制技术,它有物理和逻辑之分,但是总的来说,它需要在异地有一套独立的系统,这是两套硬件配置可以不同的系统,但是这两套系统的软件结构保持一致,包括软件的版本,目...

oracle双机/RAC/Dataguard的区别

高可用性解决方案分为4种 (DG、AR、RAC、HA): 一种是oracle提供的被用方法,Standby (=9i DataGuard) 一种是AR (高级复制Advanced Replicat...

RAC环境下创建物理DATAGUARD

为一个RAC搭建standby和单节点搭建方法基本一致,我们可以把RAC看成是一个单节点的数据库,只需要保证所有节点的日志能传送到备库即可。一、在备库服务器安装ORACLE软件只安装软件,不要创建数据...

rac dataguard搭建过程

这几天要为rac大家dataguard,但是实际上rac现在只有但节点运行,因为另一个节点服务器坏了需要维修。 如果某天节点1修好了,在起数据库之前务必先修改tnsname.ora,添加HN...

Oracle 10g RAC Dataguard Faileover

环境: (1),Oracle 10g RAC + Oracle 10g RAC Dataguard最大性能模式配置 (2),rac1,rac2 Primary Database (3),vmra...
  • deanza
  • deanza
  • 2012年08月10日 11:42
  • 835

正式生产库,配置双节点的RAC + 单实例的 DATAGUARD

正式生产库,配置DATAGUARD RAC+单实例DATAGUARD  配置 RAC 两节点: 192.1.0.101    rac1     192.1.0.102    r...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:RAC DATAGUARD primary listener
举报原因:
原因补充:

(最多只允许输入30个字)