Oracle RAC添加节点

环境说明:

OS:Centos Linux 7.5

DB:Oracle 11.2.0.4.0

已有节点:RAC1、RAC2

新加节点:RAC3 


一:环境准备

二:添加GI

三:添加Oracle软件

四:添加Oracle实例 

五:检查 


一:环境准备

RAC3服务器:

创建操作系统、配置host、创建目录并授权、创建用户和用户组、设置用户环境变量、配置yum安装所需包、

配置内核参数、 设置SHELL限制、设置ssh互信、设置共享存储、关闭防火墙、关闭seliunx;


二:添加GI

---在rac1节点执行

[grid@rac1 bin]$ cluvfy stage -pre nodeadd -n rac3 -fixup >0808.log 

[grid@rac1 ~]$ export IGNORE_PREADDNODE_CHECKS=Y

[grid@rac1 ~]$ cd $ORACLE_HOME/oui/bin

[grid@rac1 ~]$ ./addNode.sh "CLUSTER_NEW_NODES={rac3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rac3-vip}"

---在rac3节点执行脚本

[root@rac3 ~]# /u01/app/oraInventory/orainstRoot.sh

[root@rac3 ~]# /u01/app/11.2.0/grid/root.sh

---查看状态

[root@rac1 ~]# cd /u01/app/11.2.0/grid/bin 

[grid@rac1 bin]$ crs_stat -t

[grid@rac1 bin]$ crsctl stat res -t


三:添加Oracle软件

---在rac1节点执行 

[oracle@rac1 .ssh]$ $ORACLE_HOME/oui/bin/addNode.sh "CLUSTER_NEW_NODES={rac3}"

---根据提示,需要在rac3上执行root.sh

[root@rac3 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

---执行有如下两个报错(本次实验忽略该错误,不做处理)

/bin/chown:cannot access '/u01/app/oracle/product/11.2.0/db_1/bin/nmhs':No such file or directory

/bin/chmod:cannot access '/u01/app/oracle/product/11.2.0/db_1/bin/nmhs':No such file or directory

---尝试手动从rac1节点将nmhs文件拷贝到rac3,也会失败,提示权限不足

[oracle@rac1 ~]$ scp /u01/app/oracle/product/11.2.0.db_1/bin/nmhs 

rac3:/u01/app/oracle/product/11.2.0.db_1/bin/

/u01/app/oracle/product/11.2.0.db_1/bin/nmhs: Permission denied

---查看nmhs权限

[root@rac1 ~]$ ls -rth /u01/app/oracle/product/11.2.0.db_1/bin/nmh*

-r2xr-xr-x oracle oinstall  /u01/app/oracle/product/11.2.0.db_1/bin/nmh0

-rws--x--- root   oinstall  /u01/app/oracle/product/11.2.0.db_1/bin/nmhs

---rac3节点可以使用sqlplus工具了

[oracle@rac3 ~]# sqlplus / as sysdba 


四:添加Oracle实例 

---DBCA 

[oracle@rac1 ~]$ dbca 

Instance Management 

Add an instance 


五:检查  

[grid@rac1 ~]# srvctl status database -d racdb 

Instance racdb1 is running on node rac1 

Instance racdb1 is running on node rac2 

Instance racdb1 is running on node rac3 


[oracle@rac1 ~]# sqlplus / as sys dba 

SQL> select instance_name,instance_number from v$instance ;

INSTANCE_NAME    INSTANCE_NUMBER 

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

racdb3                3

racdb2                2 

racdb1                1 

郑州不孕不育医院:http://jbk.39.net/yiyuanzaixian/zztjyy/


上一篇:oracle--oracle18C软件安装(一)


下一篇:CentOS上快速安装Oracle服务器脚本