收藏 分享(赏)

Oracle11gRAC数据库节点损坏恢复.doc

上传人:精品资料 文档编号:9065073 上传时间:2019-07-22 格式:DOC 页数:18 大小:815KB
下载 相关 举报
Oracle11gRAC数据库节点损坏恢复.doc_第1页
第1页 / 共18页
Oracle11gRAC数据库节点损坏恢复.doc_第2页
第2页 / 共18页
Oracle11gRAC数据库节点损坏恢复.doc_第3页
第3页 / 共18页
Oracle11gRAC数据库节点损坏恢复.doc_第4页
第4页 / 共18页
Oracle11gRAC数据库节点损坏恢复.doc_第5页
第5页 / 共18页
点击查看更多>>
资源描述

1、地址:北京市海淀区北四环西路 52 号Oracle11gR2 Rac 节点损坏恢复方正国际公共安全事业部技术文档地址:北京市海淀区北四环西路 52 号1. 文档属性文档属性 内容文档名称 Oracle11gR2 Rac 节点损坏恢复报告文档版本号 A1文档状态 正式稿文档编写完成日期 2016 年 9 月 14 日作 者2.文档变更历史清单文件版本号 修正日期 修正人 备 注3.本次修改变更说明序号 变更内容简述1.2.3.4.5.地址:北京市海淀区北四环西路 52 号第 1 章 概述辽宁省厅警务综合平台项目中,锦州数据库现场的用户因为在未停止数据库的情况下,扩展磁盘阵列,更换磁盘,导致 1

2、节点本地磁盘阵列挂不上,导致只能一个节点使用数据库,需要重新配置 oracle 集群信息。第 2 章 系统环境项目名称 服务器名 RAC 节点 1 RAC 节点 2操作系统 RedHat 6 RedHat 6集群软件 Oracle GRID Oracle GRID服务器主机名 his1 his2IP 地址(示例) 172.31.1.50 172.31.1.51系统用户 用户名RootGridoracle系统组 dbaasmdbaasmadminoinstallasmoperdbaasmdbaasmadminoinstallasmoper地址:北京市海淀区北四环西路 52 号第 3 章 数据库环

3、境项目名称 服务器名称 RAC 节点 1 RAC 节点 2公共 IP 地址 172.31.1.50 172.31.1.51虚拟 IP 地址 172.31.1.52 172.31.1.53心跳 IP 地址 192.168.0.1 192.168.0.2ScanIP 地址 172.31.1.54Oracle RAC SID orcl1 orcl2数据库名称 orcl数据文件路径 +DATA归档文件 +ARCH数据库版本 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0(64 位)GRID_BASE 目录 /u01/app/gridG

4、RID_HOME 目录 /u01/app/grid/11.2.0ORACLE_BASE 目录 /u01/app/oracleORACLE_HOME 目录 /u01/app/oracle /11.2.0数据库监听端口 1521数据库字符集 ZHS16GBK数据库用户(sys,system )密码oracle数据库硬盘管理方式 ASM地址:北京市海淀区北四环西路 52 号第 4 章 实施步骤4.1 操作系统准备工作包括如下操作,主要和 rac 安装文档相同,如果需要重新安装操作系统,请参考 rac 安装文档的操作,进行操作系统配置。下面只列出:4.1.1 配置 grid 用户及 oracle 用户

5、等效性Grid 用户(his2 先删除.shh 目录)在 his1 上:su - grid$ mkdir /.ssh$ chmod 700 /.ssh$ ssh-keygen -t rsa$ ssh-keygen -t dsa$ cat /.ssh/id_rsa.pub /.ssh/authorized_keys$ cat /.ssh/id_dsa.pub /.ssh/authorized_keys在 his2 上:$ mkdir /.ssh$ chmod 700 /.ssh$ ssh-keygen -t rsa$ ssh-keygen -t dsa在 his1 上:$ ssh jkkdb2

6、cat /.ssh/id_rsa.pub /.ssh/authorized_keys$ ssh jkkdb2 cat /.ssh/id_dsa.pub /.ssh/authorized_keys$ scp /.ssh/authorized_keys jkkdb2:/.ssh/authorized_keys验证$ ssh his1 date地址:北京市海淀区北四环西路 52 号$ ssh his1-priv date$ ssh his2 date$ ssh his2-priv dateOracle 用户()在 his1 上:su - grid$ mkdir /.ssh$ chmod 700 /.

7、ssh$ ssh-keygen -t rsa$ ssh-keygen -t dsa$ cat /.ssh/id_rsa.pub /.ssh/authorized_keys$ cat /.ssh/id_dsa.pub /.ssh/authorized_keys在 his2 上:$ mkdir /.ssh$ chmod 700 /.ssh$ ssh-keygen -t rsa$ ssh-keygen -t dsa在 his1 上:$ ssh jkkdb2 cat /.ssh/id_rsa.pub /.ssh/authorized_keys$ ssh jkkdb2 cat /.ssh/id_dsa.

8、pub /.ssh/authorized_keys$ scp /.ssh/authorized_keys jkkdb2:/.ssh/authorized_keys验证$ ssh his1 date$ ssh his1-priv date$ ssh his2 date$ ssh his2-priv date4.1.2 设置 raw,磁盘阵列联系硬件厂家,扩展磁盘操作等等,两个机器的磁盘信息相同,主要是挂的磁盘号要一致。地址:北京市海淀区北四环西路 52 号4.1.3 重启 his1 服务器4.2 停止原来 1 节点 vip$ srvctl disable listener -l listener

9、_name -n his1$ srvctl stop listener -l listener_name -n his14.3 删除原 1 节点数据库实例信息oracle 用户执行:$dbca -silent -deleteInstance -nodeList his1 -gdbName orcl -instanceName orcl1 -sysDBAUserName sys -sysDBAPassword oracle此时查看数据库信息:$srvctl config database -d orclDatabase unique name: orclDatabase name: Oracle

10、 home: /oracle/product/11.2.0/db_1Oracle user: oracleSpfile: Domain: Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: orclDatabase instances: his2 -原来是 his1,his2Disk Groups: DATAMount point paths: Services: Type: RACDatabase is administrator m

11、anaged地址:北京市海淀区北四环西路 52 号4.4 清除 rac 信息清除 grid/grid/gridhome/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/grid/gridhome “CLUSTER_NODES=his2“ CRS=TRUE -silentStarting Oracle Universal Installer.Checking swap space: must be greater than 500 MB. Actual 20480 MB PassedThe inventory pointer is locate

12、d at /etc/oraInst.locThe inventory is located at /grid/gridbase/oraInventoryUpdateNodeList was successful.清除 oracle/oracle/product/11.2.0/db_1/oui/binrunInstaller -updateNodeList ORACLE_HOME= /oracle/product/11.2.0/db_1 “CLUSTER_NODES=his2“Starting Oracle Universal Installer.Checking swap space: mus

13、t be greater than 500 MB. Actual 20480 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /oracle/oraInventoryUpdateNodeList was successful.查看/grid/gridhome/opmen/conf/ons.config 文件usesharedinstall=trueallowgroup=truelocalport=6100 # line added by Agentremotepor

14、t=6200 # line added by Agentnodes=his2:6200 # line added by Agent如果还有 his1 信息,手工删除4.5 清除 1 节点 vip$srvctl remove vip -i his1-vipPlease confirm that you intend to remove the VIPs his1-vip (y/n) y地址:北京市海淀区北四环西路 52 号4.6 检查当前集群信息$olsnodes -s t$crs_stat t$cluvfy stage -post nodedel -n his1 -verbosePerform

15、ing post-checks for node removal Checking CRS integrity.Clusterware version consistency passedThe Oracle Clusterware is healthy on node “his2“CRS integrity check passedResult: Node removal check passedPost-check for node removal was successful.4.7 重新添加 1 节点到集群4.7.1 添加 grid 软件环境检查$cluvfy comp peer -r

16、efnode his2 -n his1 -verbose$cluvfy stage -pre nodeadd -n his1 verbose在/grid/gridhome/oui/bin 下:$export IGNORE_PREADDNODE_CHECKS=Y$./addNode.sh -silent “CLUSTER_NEW_NODES=his1“ “CLUSTER_NEW_VIRTUAL_HOSTNAMES=his1-vip“Performing pre-checks for node addition Checking node reachability. Node reachabili

17、ty check passed from node “his1“ Checking user equivalence. User equivalence check passed for user “grid“ Checking node connectivity. Checking hosts config file. Verification of the hosts config file successful.地址:北京市海淀区北四环西路 52 号略.(WARNING:A new inventory has been created on one or more nodes in th

18、is session. However, it has not yet been registered as the central inventory of this system. To register the new inventory please run the script at /grid/gridbase/oraInventory/orainstRoot.sh with root privileges on nodes his1.If you do not register the inventory, you may not be able to update or pat

19、ch the products you installed.The following configuration scripts need to be executed as the “root“ user in each new cluster node. Each script in the list below is followed by a list of nodes./grid/gridbase/oraInventory/orainstRoot.sh #On nodes hxbak1/grid/gridhome/root.sh #On nodes his1To execute t

20、he configuration scripts:1. Open a terminal window2. Log in as “root“3. Run the scripts in each cluster nodeThe Cluster Node Addition of /grid/gridhome was successful.Please check /tmp/silentInstall.log for more details.在 his1 以 root 用户执行 orainstRoot.sh 和 root.sh 两个脚本:脚本执行过程略。到这,his1 上面 grid 已经添加完成。

21、Asm 和监听 vip 等都启动了。查看集群状态gridhis2 $ crs_stat -tName Type Target State Host -ora.ARCHDG.dg oraup.type ONLINE ONLINE his1 ora.CRSDG.dg oraup.type ONLINE ONLINE his1 ora.DATADG.dg oraup.type ONLINE ONLINE his1 oraER.lsnr oraer.type ONLINE ONLINE his1 oraN1.lsnr oraer.type ONLINE ONLINE his2 ora.asm ora.

22、asm.type ONLINE ONLINE his1 ora.cvu ora.cvu.type ONLINE ONLINE his2 ora.gsd ora.gsd.type OFFLINE OFFLINE oraSM1.asm application ONLINE ONLINE his1 oraS1.lsnr application ONLINE ONLINE his1 地址:北京市海淀区北四环西路 52 号ora.his1.gsd application OFFLINE OFFLINE ora.his1.ons application ONLINE ONLINE his1 ora.his

23、1.vip orat1.type ONLINE ONLINE his1 oraSM2.asm application ONLINE ONLINE his2 oraS2.lsnr application ONLINE ONLINE his2 ora.his2.gsd application OFFLINE OFFLINE ora.his2.ons application ONLINE ONLINE his2 ora.his2.vip orat1.type ONLINE ONLINE his2 oranetwork orark.type ONLINE ONLINE his1 ora.oc4j or

24、a.oc4j.type ONLINE ONLINE his2 ora.ons ora.ons.type ONLINE ONLINE his1 ora.orcl.db orase.type ONLINE ONLINE his2 ora.scan1.vip oraip.type ONLINE ONLINE his2 4.7.2 添加 oracle 软件在 his2 服务器/oracle/product/11.2.0/db_1/oui/bin/ 下执行:$export IGNORE_PREADDNODE_CHECKS=Y$ ./addNode.sh “CLUSTER_NEW_NODES=his1“S

25、aving inventory on nodes . 100% Done.Save inventory completeWARNING:The following configuration scripts need to be executed as the “root“ user in each new cluster node. Each script in the list below is followed by a list of nodes./oracle/product/11.2.0/db1/root.sh #On nodes his1To execute the config

26、uration scripts:1. Open a terminal window2. Log in as “root“3. Run the scripts in each cluster nodeThe Cluster Node Addition of /oracle/product/11.2.0/db_1 was successful.Please check /tmp/silentInstall.log for more details.在 his1 节点上以 root 用户执行/oracle/product/11.2.0/db1/root.sh 脚本Performing root us

27、er operation for Oracle 11g The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /oracle/product/11.2.0/db_1Enter the full pathname of the local bin directory: /usr/local/bin: 地址:北京市海淀区北四环西路 52 号The contents of “dbhome“ have not changed. No need to overwrite.The contents o

28、f “oraenv“ have not changed. No need to overwrite.The contents of “coraenv“ have not changed. No need to overwrite.Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific ro

29、ot actions will be performed.Finished product-specific root actions.查看 his1 服务器/grid/gridhome/opmn/conf/ons.conf 文件more ons.configusesharedinstall=trueallowgroup=truelocalport=6100 # line added by Agentremoteport=6200 # line added by Agentnodes=his1:6200,his2:6200 # line added by Agent如果 his2 服务的/gr

30、id/gridhome/opmn/conf/ons.conf 没有添加 his1:6200 信息,手工给加上4.7.3 添加数据库实例在任意节点 oracle 用户执行 dbca地址:北京市海淀区北四环西路 52 号地址:北京市海淀区北四环西路 52 号注:实际当前环境只有 1 个实例 orcl2:his2 active地址:北京市海淀区北四环西路 52 号添加 orcl1 实例地址:北京市海淀区北四环西路 52 号地址:北京市海淀区北四环西路 52 号到此,节点恢复完成。地址:北京市海淀区北四环西路 52 号第 5 章 遇到的问题在添加 oracle 软件的时候,因为之前没有执行清除 ora

31、cle 的操作,仅仅是清除了 grid 信息,导致集群认为 his1 的 oracle 软件已经存在,所以无法传文件。解决方案是再执行:/oracle/product/11.2.0/db_1/oui/binrunInstaller -updateNodeList ORACLE_HOME= /oracle/product/11.2.0/db_1 “CLUSTER_NODES=his2“然后再添加的时候报错:Error ocurred while retrieving node numbers of the existing nodes. Please check if clusterware h

32、ome is properly configured.SEVERE:Error ocurred while retrieving node numbers of the existing nodes. Please check if clusterware home is properly configured.解决办法是:copy 2 files (olsnodes ,olsnodes.bin) from CRS_HOME/bin to ORACLEC_HOME/bin# cp /grid/gridhome/bin/olsnodes* /oracle/product/11.2.0/db_1/bin/# chown oracle:oinstall /oracle/product/11.2.0/db1/bin/olsn*然后执行./addNode.sh -silent “CLUSTER_NEW_NODES=his1“ “CLUSTER_NEW_VIRTUAL_HOSTNAMES=his1-vip“传过去之后需要重新执行 orainstRoot.sh 和 root.sh 两个脚本。

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报