我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

10GRAC手动注册监听服务

下面测试来至一次增加与删除实例实验,在10G RAC中知道监听是通过netca来管理的,跟11G的机制不一样。

10多年的永新网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整永新建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“永新网站设计”,“永新网站推广”以来,每个客户项目都认真落实执行。

当增加节点的时候,需要手动执行netca来注册监听服务。其实我们也可以通过crs_profile工具来手动注册监听服务。

 

欢迎大家加入ORACLE超级群:17115662 免费解决各种ORACLE问题

 

数据库版本信息

[oracle@www.htz.pw oracle] $sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.4.0 - Production on Sun May 11 17:06:26 2014

 

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SQL> select * from v$version;

 

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod

PL/SQL Release 10.2.0.4.0 - Production

CORE   10.2.0.4.0     Production

TNS for Solaris: Version 10.2.0.4.0 - Production

NLSRTL Version 10.2.0.4.0 - Production

1,配置tnsnames.ora与listener.ora文件

如下:

[root@www.htz.pw admin] $ cat listener.ora

# listener.ora.sol1 Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.sol1

# Generated by Oracle configuration tools.

 

LISTENER_SOL1 =

 (DESCRIPTION_LIST =

   (DESCRIPTION =

     (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.111.48)(PORT = 1521)(IP = FIRST))

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.111.46)(PORT = 1521)(IP = FIRST))

   )

 )

#这里建议使用IP地址

SID_LIST_LISTENER_SOL1 =

 (SID_LIST =

   (SID_DESC =

     (SID_NAME = PLSExtProc)

     (ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)

     (PROGRAM = extproc)

   )

 )

 

 

 

[root@www.htz.pw app] $cd $ORACLE_HOME/network/admin

[root@www.htz.pw admin] $ cat tnsnames.ora

# tnsnames.ora.sol1 Network Configuration File: /oracle/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora.sol1

# Generated by Oracle configuration tools.

 

LISTENERS_SOL10G =

 (ADDRESS_LIST =

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol1-vip)(PORT = 1521))

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol2-vip)(PORT = 1521))

 )

#这里建议使用IP地址,在10G中配置REMOTE_LISTENER的时候,默认会用到这里的东西

SOL10G2 =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol2-vip)(PORT = 1521))

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = sol10g)

     (INSTANCE_NAME = sol10g2)

   )

 )

 

SOL10G1 =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol1-vip)(PORT = 1521))

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = sol10g)

     (INSTANCE_NAME = sol10g1)

   )

 )

 

SOL10G =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol1-vip)(PORT = 1521))

   (ADDRESS = (PROTOCOL = TCP)(HOST = sol2-vip)(PORT = 1521))

   (LOAD_BALANCE = yes)

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = sol10g)

   )

 )

2,crs_register注册监听服务

注意监听服务有两种方法,1,利用现在的监听的配置信息。2,使用crs_profile来创建

2.1利用现有的监听配置信息

[oracle@www.htz.pw oracle]$ crs_stat -p ora.sol2.LISTENER_SOL2.lsnr >/tmp/listener.txt

这里导出正常节点的监听配置信息

 

[oracle@www.htz.pw oracle]$ cat /tmp/listener.txt

NAME=ora.sol1.LISTENER_SOL1.lsnr

#这里需要注意的LISTENER_SOL1这个名字需要跟listener.ora中的监听名一致

TYPE=application

ACTION_SCRIPT=/oracle/app/oracle/product/10.2.0/db_1/bin/racgwrap

ACTIVE_PLACEMENT=0

AUTO_START=1

CHECK_INTERVAL=600

DESCRIPTION=CRS application for listener on node

FAILOVER_DELAY=0

FAILURE_INTERVAL=0

FAILURE_THRESHOLD=0

HOSTING_MEMBERS=sol1

OPTIONAL_RESOURCES=

PLACEMENT=restricted

REQUIRED_RESOURCES=ora.sol1.vip

RESTART_ATTEMPTS=5

SCRIPT_TIMEOUT=600

START_TIMEOUT=0

STOP_TIMEOUT=0

UPTIME_THRESHOLD=7d

USR_ORA_ALERT_NAME=

USR_ORA_CHECK_TIMEOUT=0

USR_ORA_CONNECT_STR=/ as sysdba

USR_ORA_DEBUG=0

USR_ORA_DISCONNECT=false

USR_ORA_FLAGS=

USR_ORA_IF=

USR_ORA_INST_NOT_SHUTDOWN=

USR_ORA_LANG=

USR_ORA_NETMASK=

USR_ORA_OPEN_MODE=

USR_ORA_OPI=false

USR_ORA_PFILE=

USR_ORA_PRECONNECT=none

USR_ORA_SRV=

USR_ORA_START_TIMEOUT=0

USR_ORA_STOP_MODE=immediate

USR_ORA_STOP_TIMEOUT=0

USR_ORA_VIP=

一共就3个地址需要修改

[oracle@www.htz.pw oracle]$ mv /tmp/listener.txt $ORA_CRS_HOME/crs/public/ora.sol1.LISTENER_SOL1.lsnr.cap

[oracle@www.htz.pw oracle]$ crs_register ora.sol1.LISTENER_SOL1.lsnr                  

[oracle@www.htz.pw oracle]$ crs_start ora.sol1.LISTENER_SOL1.lsnr  

Attempting to start `ora.sol1.LISTENER_SOL1.lsnr` on member `sol1`

Start of `ora.sol1.LISTENER_SOL1.lsnr` on member `sol1` succeeded.

监听能正常启动

2.2使用crs_profiler来手动创建监听

不到万不得以,不建议使用下面的方法

[oracle@www.htz.pw oracle]$ crs_profile -create ora.sol1.LISTENER_SOL1.lsnr -t application -a /oracle/app/oracle/product/10.2.0/db_1/bin/racgwrap -d "CRS application for listener on node" -h sol1 -r ora.sol1.vip -p restricted -o as=1,ci=600,st=600,ra=5

 

[oracle@www.htz.pw oracle]$ cat ora.sol1.LISTENER_SOL1.lsnr.cap

NAME=ora.sol1.LISTENER_SOL1.lsnr

TYPE=application

ACTION_SCRIPT=/oracle/app/oracle/product/10.2.0/db_1/bin/racgwrap

ACTIVE_PLACEMENT=0

AUTO_START=1

CHECK_INTERVAL=600

DESCRIPTION=CRS application for listener on node

FAILOVER_DELAY=0

FAILURE_INTERVAL=0

FAILURE_THRESHOLD=0

HOSTING_MEMBERS=sol1

OPTIONAL_RESOURCES=

PLACEMENT=restricted

REQUIRED_RESOURCES=ora.sol1.vip

RESTART_ATTEMPTS=5

SCRIPT_TIMEOUT=600

START_TIMEOUT=0

STOP_TIMEOUT=0

UPTIME_THRESHOLD=7d

USR_ORA_ALERT_NAME=

USR_ORA_CHECK_TIMEOUT=0

USR_ORA_CONNECT_STR=/ as sysdba

USR_ORA_DEBUG=0

USR_ORA_DISCONNECT=false

USR_ORA_FLAGS=

USR_ORA_IF=

USR_ORA_INST_NOT_SHUTDOWN=

USR_ORA_LANG=

USR_ORA_NETMASK=

USR_ORA_OPEN_MODE=

USR_ORA_OPI=false

USR_ORA_PFILE=

USR_ORA_PRECONNECT=none

USR_ORA_SRV=

USR_ORA_START_TIMEOUT=0

USR_ORA_STOP_MODE=immediate

USR_ORA_STOP_TIMEOUT=0

USR_ORA_VIP=

 

 

[oracle@www.htz.pw oracle]$ crs_register ora.sol1.LISTENER_SOL1.lsnr                       

[oracle@www.htz.pw oracle]$ crs_start ora.sol1.LISTENER_SOL1.lsnr                          

Attempting to start `ora.sol1.LISTENER_SOL1.lsnr` on member `sol1`

Start of `ora.sol1.LISTENER_SOL1.lsnr` on member `sol1` succeeded   

 

其实如果是VIP资源的时候,我们需要注意了,因为VIP资料的属组是root

[oracle@www.htz.pw oracle]$ crs_stat -ls                                                    

Name          Owner         Primary PrivGrp         Permission 

----------------------------------------------------------------- 

ora....L1.lsnr oracle        oinstall                rwxrwxr--  

ora.sol1.gsd  oracle        oinstall                rwxr-xr--  

ora.sol1.ons  oracle        oinstall                rwxr-xr--  

ora.sol1.vip  root          oinstall                rwxr-xr--  

ora.sol10g.db oracle        oinstall                rwxrwxr--  

ora....g2.inst oracle        oinstall                rwxrwxr--  

ora....SM2.asm oracle        oinstall                rwxrwxr--  

ora....L2.lsnr oracle        oinstall                rwxrwxr--  

ora.sol2.gsd  oracle        oinstall                rwxr-xr--  

ora.sol2.ons  oracle        oinstall                rwxr-xr--  

ora.sol2.vip  root          oinstall                rwxr-xr


本文标题:10GRAC手动注册监听服务
文章位置:http://mswzjz.cn/article/jdijgd.html

其他资讯