来自官方文档:
()Can I change the public hostname in my Oracle Database 10g Cluster using Oracle Clusterware? Hostname changes are not supported in Oracle Clusterware (CRS), unless you want to perform a deletenode followed by a new addnode operation.
The hostname is used to store among other things the flag files and Oracle Clusterware stack will not start if hostname is changed. ()Does the hostname have to match the public name or can it be anything else? When there is no vendor clusterware, only Oracle Clusterware, then the public node name must match the host name. When vendor clusterware is present, it determines the public node names, and the installer doesn't present an opportunity to change them. So, when you have a choice, always choose the hostname. From: Metalink Note 220970.1 RAC Frequently Asked Questions:

(1). RAC 环境一旦安装好后, 主机名就不能修改,除非先删除节点,修改Hostname, 在添加节点。

(2). 主机名必须和public 名一致。这一点在安装文档中有特别强调。

大神博客链接:http://blog.csdn.net/tianlesoftware/article/details/6055612

由于之前的安装失误,将/etc/hosts文件配置成如下格式

#管理网段
30.11.3.178 rappdb1
30.11.3.179 rappdb2
#public IP
30.2.21.161 rappdb1-pub
30.2.21.163 rappdb2-pub 30.2.21.162 rappdb1-vip
30.2.21.163 rappdb2-vip 172.2.21.101 rappdb1-priv
172.2.21.102 rappdb2-priv

当安装完成后,监听中发现监听的是 管理IP(30.11.3.178)和VIP(30.2.21.162),正常应该是监听PublicIP和VIP。一般不建议直接修改hosts文件。

修复操作如下:

一、先卸载CRS
在非最后一个节点运行

/oracle/asm/crs/install/rootcrs.pl -verbose -deconfig -force

Using configuration parameter file: /oracle/asm/crs/install/crsconfig_params
Network exists: /8.8.6.0/255.255.255.0/en0, type static
VIP exists: /dbrac1-vip/8.8.6.11/8.8.6.0/255.255.255.0/en0, hosting node dbrac1
VIP exists: /dbrac2-vip/8.8.6.21/8.8.6.0/255.255.255.0/en0, hosting node dbrac2
GSD exists
ONS exists: Local port , remote port , EM port
CRS-: Attempting to stop 'ora.registry.acfs' on 'dbrac1'
CRS-: Stop of 'ora.registry.acfs' on 'dbrac1' succeeded
CRS-: Starting shutdown of Oracle High Availability Services-managed resources on 'dbrac1'
CRS-: Attempting to stop 'ora.crsd' on 'dbrac1'
CRS-: Starting shutdown of Cluster Ready Services-managed resources on 'dbrac1'
CRS-: Attempting to stop 'ora.oc4j' on 'dbrac1'
CRS-: Attempting to stop 'ora.ASMCRS.dg' on 'dbrac1'
CRS-: Attempting to stop 'ora.racdb.db' on 'dbrac1'
CRS-: Stop of 'ora.racdb.db' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.ASMVG1.dg' on 'dbrac1'
CRS-: Stop of 'ora.ASMVG1.dg' on 'dbrac1' succeeded
CRS-: Stop of 'ora.oc4j' on 'dbrac1' succeeded
CRS-: Attempting to start 'ora.oc4j' on 'dbrac2'
CRS-: Start of 'ora.oc4j' on 'dbrac2' succeeded
CRS-: Stop of 'ora.ASMCRS.dg' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.asm' on 'dbrac1'
CRS-: Stop of 'ora.asm' on 'dbrac1' succeeded
CRS-: Shutdown of Cluster Ready Services-managed resources on 'dbrac1' has completed
CRS-: Stop of 'ora.crsd' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.drivers.acfs' on 'dbrac1'
CRS-: Attempting to stop 'ora.crf' on 'dbrac1'
CRS-: Attempting to stop 'ora.ctssd' on 'dbrac1'
CRS-: Attempting to stop 'ora.evmd' on 'dbrac1'
CRS-: Attempting to stop 'ora.asm' on 'dbrac1'
CRS-: Attempting to stop 'ora.mdnsd' on 'dbrac1'
CRS-: Stop of 'ora.crf' on 'dbrac1' succeeded
CRS-: Stop of 'ora.ctssd' on 'dbrac1' succeeded
CRS-: Stop of 'ora.evmd' on 'dbrac1' succeeded
CRS-: Stop of 'ora.mdnsd' on 'dbrac1' succeeded
CRS-: Stop of 'ora.drivers.acfs' on 'dbrac1' succeeded
CRS-: Stop of 'ora.asm' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.cluster_interconnect.haip' on 'dbrac1'
CRS-: Stop of 'ora.cluster_interconnect.haip' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.cssd' on 'dbrac1'
CRS-: Stop of 'ora.cssd' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.gipcd' on 'dbrac1'
CRS-: Stop of 'ora.gipcd' on 'dbrac1' succeeded
CRS-: Attempting to stop 'ora.gpnpd' on 'dbrac1'
CRS-: Stop of 'ora.gpnpd' on 'dbrac1' succeeded
CRS-: Shutdown of Oracle High Availability Services-managed resources on 'dbrac1' has completed
CRS-: Oracle High Availability Services has been stopped.
This may take several minutes. Please wait ...
- odmdelete: objects deleted.
- odmdelete: objects deleted.
- odmdelete: objects deleted.
Successfully deconfigured Oracle clusterware stack on this node

在最后一个节点运行

/oracle/asm/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode

Using configuration parameter file: /oracle/asm/crs/install/crsconfig_params
CRS resources for listeners are still configured
Network exists: /8.8.6.0/255.255.255.0/en0, type static
VIP exists: /dbrac2-vip/8.8.6.21/8.8.6.0/255.255.255.0/en0, hosting node dbrac2
GSD exists
ONS exists: Local port , remote port , EM port
CRS-: Attempting to stop 'ora.registry.acfs' on 'dbrac2'
CRS-: Stop of 'ora.registry.acfs' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.crsd' on 'dbrac2'
CRS-: Starting shutdown of Cluster Ready Services-managed resources on 'dbrac2'
CRS-: Attempting to stop 'ora.oc4j' on 'dbrac2'
CRS-: Attempting to stop 'ora.ASMCRS.dg' on 'dbrac2'
CRS-: Attempting to stop 'ora.racdb.db' on 'dbrac2'
CRS-: Stop of 'ora.racdb.db' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.ASMVG1.dg' on 'dbrac2'
CRS-: Stop of 'ora.ASMVG1.dg' on 'dbrac2' succeeded
CRS-: Stop of 'ora.oc4j' on 'dbrac2' succeeded
CRS-: Stop of 'ora.ASMCRS.dg' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.asm' on 'dbrac2'
CRS-: Stop of 'ora.asm' on 'dbrac2' succeeded
CRS-: Shutdown of Cluster Ready Services-managed resources on 'dbrac2' has completed
CRS-: Stop of 'ora.crsd' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.ctssd' on 'dbrac2'
CRS-: Attempting to stop 'ora.evmd' on 'dbrac2'
CRS-: Attempting to stop 'ora.asm' on 'dbrac2'
CRS-: Stop of 'ora.evmd' on 'dbrac2' succeeded
CRS-: Stop of 'ora.ctssd' on 'dbrac2' succeeded
CRS-: Stop of 'ora.asm' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.cluster_interconnect.haip' on 'dbrac2'
CRS-: Stop of 'ora.cluster_interconnect.haip' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.cssd' on 'dbrac2'
CRS-: Stop of 'ora.cssd' on 'dbrac2' succeeded
CRS-: Attempting to start 'ora.cssdmonitor' on 'dbrac2'
CRS-: Start of 'ora.cssdmonitor' on 'dbrac2' succeeded
CRS-: Attempting to start 'ora.cssd' on 'dbrac2'
CRS-: Attempting to start 'ora.diskmon' on 'dbrac2'
CRS-: Start of 'ora.diskmon' on 'dbrac2' succeeded
CRS-: Start of 'ora.cssd' on 'dbrac2' succeeded
CRS-: Successful deletion of voting disk +ASMCRS.
ASM de-configuration trace file location: /tmp/asmcadc_clean2012--20_10---AM.log
ASM Clean Configuration START
ASM Clean Configuration END ASM with SID +ASM1 deleted successfully. Check /tmp/asmcadc_clean2012--20_10---AM.log for details. CRS-: Starting shutdown of Oracle High Availability Services-managed resources on 'dbrac2'
CRS-: Attempting to stop 'ora.mdnsd' on 'dbrac2'
CRS-: Attempting to stop 'ora.crf' on 'dbrac2'
CRS-: Attempting to stop 'ora.ctssd' on 'dbrac2'
CRS-: Attempting to stop 'ora.asm' on 'dbrac2'
CRS-: Stop of 'ora.mdnsd' on 'dbrac2' succeeded
CRS-: Stop of 'ora.crf' on 'dbrac2' succeeded
CRS-: Stop of 'ora.asm' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.cluster_interconnect.haip' on 'dbrac2'
CRS-: Stop of 'ora.ctssd' on 'dbrac2' succeeded
CRS-: Stop of 'ora.cluster_interconnect.haip' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.cssd' on 'dbrac2'
CRS-: Stop of 'ora.cssd' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.gipcd' on 'dbrac2'
CRS-: Stop of 'ora.gipcd' on 'dbrac2' succeeded
CRS-: Attempting to stop 'ora.gpnpd' on 'dbrac2'
CRS-: Stop of 'ora.gpnpd' on 'dbrac2' succeeded
CRS-: Shutdown of Oracle High Availability Services-managed resources on 'dbrac2' has completed
CRS-: Oracle High Availability Services has been stopped.
This may take several minutes. Please wait ...
- odmdelete: objects deleted.
- odmdelete: objects deleted.
- odmdelete: objects deleted.
Successfully deconfigured Oracle clusterware stack on this node

二、修改主机名 (本案例不涉及修改主机名)
smitty tcpip修改主机名
第一节点:dbrac1修改为dbrac100
第一节点:dbrac2修改为dbrac200

三、修改/etc/hosts

#管理网段
#30.11.3.178 rappdb1
#30.11.3.179 rappdb2
#public IP
30.2.21.161 rappdb1
30.2.21.163 rappdb2 30.2.21.162 rappdb1-vip
30.2.21.163 rappdb2-vip 172.2.21.101 rappdb1-priv
172.2.21.102 rappdb2-priv

四、修改11g grid的参数文件
修改$ORACLE_HOME/crs/install/crsconfig_params中相关部分:

ORACLE_HOME=/oracle/asm
ORACLE_BASE=/oracle/grid
OLD_CRS_HOME= JREDIR=/oracle/asm/jdk/jre/
JLIBDIR=/oracle/asm/jlib VNDR_CLUSTER=false
OCR_LOCATIONS=NO_VAL
CLUSTER_NAME=dbrac-cluster
HOST_NAME_LIST=dbrac100,dbrac200
NODE_NAME_LIST=dbrac100,dbrac200
PRIVATE_NAME_LIST=
VOTING_DISKS=NO_VAL
#VF_DISCOVERY_STRING=%s_vfdiscoverystring%
ASM_UPGRADE=false
ASM_SPFILE=
ASM_DISK_GROUP=ASMCRS
ASM_DISCOVERY_STRING=
ASM_DISKS=/dev/rhdisk3
ASM_REDUNDANCY=EXTERNAL
CRS_STORAGE_OPTION=
CSS_LEASEDURATION=
CRS_NODEVIPS="dbrac100-vip/255.255.255.0/en0,dbrac200-vip/255.255.255.0/en0"
NODELIST=dbrac100,dbrac200
NETWORKS="en0"/8.8.6.0:public,"en1"/7.7.9.0:cluster_interconnect
SCAN_NAME=dbrac-scan
SCAN_PORT=
GPNP_PA=
OCFS_CONFIG= # GNS consts
GNS_CONF=false
GNS_ADDR_LIST=
GNS_DOMAIN_LIST=
GNS_ALLOW_NET_LIST=
GNS_DENY_NET_LIST=
GNS_DENY_ITF_LIST= #### Required by OUI add node
NEW_HOST_NAME_LIST=
NEW_NODE_NAME_LIST=
NEW_PRIVATE_NAME_LIST=
NEW_NODEVIPS="dbrac100-vip/255.255.255.0/en0,dbrac200-vip/255.255.255.0/en0" ############### OCR constants
# GPNPCONFIGDIR is handled differently in dev (T_HAS_WORK for all)
# GPNPGCONFIGDIR in dev expands to T_HAS_WORK_GLOBAL
GPNPCONFIGDIR=$ORACLE_HOME
GPNPGCONFIGDIR=$ORACLE_HOME
OCRLOC=
OLRLOC=
OCRID=
CLUSTER_GUID= CLSCFG_MISSCOUNT= #### IPD/OS
CRFHOME="/oracle/asm"

注:10g RAC的参数配置文件: $ORA_CRS_HOME/install/rootconfig

五、在各个节点依次运行root.sh脚本
节点1运行root.sh
另外一个节点运行root.sh

六、注册信息
1.grid用户asmca命令加载ASMVG1
2.oracle用户注册集群信息
./srvctl add database -d racdb -o /oracle/db/product/11.2
./srvctl add instance -d racdb -i racdb1 -n dbrac100     
./srvctl add instance -d racdb -i racdb2 -n dbrac200
root用户
./srvctl add scan -n  dbrac-scan -S 8.8.6.0/255.255.255.0

3.grid用户netca注册监听

七、完成检查状态
$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.ASMCRS.dg  ora....up.type ONLINE    ONLINE    dbrac100    
ora.ASMVG1.dg  ora....up.type ONLINE    ONLINE    dbrac100    
ora....ER.lsnr ora....er.type ONLINE    ONLINE    dbrac100    
ora.asm        ora.asm.type   ONLINE    ONLINE    dbrac100    
ora....SM1.asm application    ONLINE    ONLINE    dbrac100    
ora....00.lsnr application    ONLINE    ONLINE    dbrac100    
ora....100.gsd application    OFFLINE   OFFLINE               
ora....100.ons application    ONLINE    ONLINE    dbrac100    
ora....100.vip ora....t1.type ONLINE    ONLINE    dbrac100    
ora....SM2.asm application    ONLINE    ONLINE    dbrac200    
ora....00.lsnr application    ONLINE    ONLINE    dbrac200    
ora....200.gsd application    OFFLINE   OFFLINE               
ora....200.ons application    ONLINE    ONLINE    dbrac200    
ora....200.vip ora....t1.type ONLINE    ONLINE    dbrac200    
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type ONLINE    ONLINE    dbrac100    
ora.ons        ora.ons.type   ONLINE    ONLINE    dbrac100    
ora.racdb.db   ora....se.type ONLINE    ONLINE    dbrac100    
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    dbrac100

ORACLE RAC 11G 更改 /etc/hosts文件的更多相关文章

  1. Linux 上Oracle RAC 10g 升级到 Oracle RAC 11g

    了解如何在 Oracle Enterprise Linux 5 上逐步将 Oracle RAC 10g 第 2 版升级到 Oracle RAC 11g. Oracle 数据库 11g(即,新一代网格计 ...

  2. Oracle RAC 11g DG Broker配置和测试

    Oracle RAC 11g DG Broker配置和测试 之前在<RHEL6.4 + Oracle 11g DG测试环境快速搭建参考>已经简单说过. 本篇在实验环境中实际配置 环境: R ...

  3. 安装Oracle RAC 11g

    1.Oracle Enterprise Linux 和 iSCSI 上构建 Oracle RAC 11g 集群 2.Oracle RAC 的所有共享磁盘存储将基于 iSCSI,iSCSI 使用在第三个 ...

  4. Oracle LISTENER 主机名修改为IP地址后LISTENER无法监听到实例 oracle监听错误与hosts文件配置

    为什么listener.ora文件里面HOST后面到底应该输入IP地址还是主机名.我的经验告诉我,这边最好使用主机名.很多的时候,一个机器绑定的不只一个IP地址,如HOST后面是IP地址,那么ORAC ...

  5. oracle之 RAC 11G ASM下控制文件多路复用

    如果数据库仅有一组control file文件,需要添加一组或者多组,保证一组文件损坏或者丢失导致数据库宕机. -- 环境说明SQL> select * from v$version;BANNE ...

  6. 安装Oracle Database 11g 找不到文件“WFMLRSVCApp.ear” .

    在64位Windows 7 系统下安装Oracle Database 11g 的过程中,出现提示:“未找到文件D:\app\Administrator\product\11.2.0\dbhome_1\ ...

  7. 更改本地hosts文件

    在 C:\Windows\System32\drivers\etc 下更改 hosts 文件 127.0.0.1 www.baidu.com 这样访问 www.baidu.com 这个地址,其实是访问 ...

  8. 如何获得 oracle RAC 11g asm spfile S档

     方法一: [root@vmrac1 ~]# su - grid [grid@vmrac1 ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.3.0 ...

  9. oracle RAC 11g sqlload 生产表导入数据(ORA-12899)

    背景:由于即将来临的双十一,业务部门(我司是做京东,天猫的短信服务),短信入库慢,需要DBA把数据库sqlload进数据库. 表结构如下: MRS VARCHAR2(100), STATUS VARC ...

随机推荐

  1. eclipse 查看变量或方法在什么地方被调用的快捷键

    选中方法名,点鼠标右键,菜单里有个”打开调用层次结构 ( Open Call Hierarchy )“,选中或者按下快捷键Ctrl+Alt+H,就在下面栏目里能看到调用的树形结构了. 或者: 1.双击 ...

  2. Geometry关系高级操作

    一些高级的操作 几何形状Geometry缓冲(buffer) 线段的融合(linemerge)是将Geometry A中相互连接的线段进行连接 多边形化操作(polygonize)对Geometry ...

  3. Google Protocol Buffer 的使用

    简介 Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 种报文格式定义和超过 12,183 ...

  4. 第一二九天上课 PHP 自制简单开发模板

    构建基础架构 在项目文件夹(自定义)下创建 (1)核心目录:WQ (2)模板目录:MoBan (3)编译目录:BianYi (4)创建配置文件: config.ini.php <?php //获 ...

  5. 初尝 JFinal 项目(二)

    这里以Roles角色表修改功能做一个例子 RolesController /** * 角色管理控制类 * @author 御手洗红豆 */public class RolesController ex ...

  6. c#中实现多个接口出现同名同参的方法

    IDictionary接口类同时继承了 IEnumerable<KeyValuePair<TKey, TValue>> 和 IEnumerable这两个接口 public in ...

  7. 《Pro Git》阅读随想

    之前做版本管理,我使用最多的是SVN,而且也只是在用一些最常用的操作.最近公司里很多项目都开始上Git,借这个机会,我计划好好学习一下Git的操作和原理,以及蕴含在其中的设计思想.同事推荐了一本< ...

  8. Java入门记(一):折腾HelloWorld

    HelloWorld,学习每门语言的第一步.有人戏称,这些年的编程生涯就是学习各种语言的HelloWorld,不知是自谦还是自嘲.目前所在的公司使用Java作为主要开发语言,我进行语言转换也大半年了, ...

  9. 传输层(3)-缓冲区大小及限制、TCP输出

    3.缓冲区大小及限制 影响IP数据报大小的限制. 1)IPv4数据报,最大大小是65535. 2)硬件规定的MTU.以太网的MTU是1500字节.SLIP链路1006字节或296字节 3)路径MTU. ...

  10. 9.5.8 Optimizing InnoDB Disk I/O

    如果你数据库设计以及sq操作都是最佳实践,但是你数据库仍然被较重的io活动拖累的较慢,那么试一试看看top或者windows的任务管理器,cpu使用率和工作量低于70%,那么或许是您的硬盘较慢. 1 ...