关键词不能为空

当前您在: 主页 > 英语 >

OraclegRAC数据库节点损坏恢复

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-01-29 23:54
tags:

-

2021年1月29日发(作者:苍茫)





Oracle11gR2 Rac


节点损坏恢复












方正国际公共安全事业部



技术文档

















1.



文档属性



文档属性



文档名称



报告文档版本号



文档状态



文档编写完成日期







内容



Oracle11gR2 Rac


节点损坏恢复



A1



正式稿



2016



9



14








2.


文档变更历史清单



文件版本号












修正日期







修正人













3.


本次修改变更说明



序号



1.




2.




3.




4.




5.




变更内容简述










1




概述



辽宁省厅警务综合平台项目中,


锦州数据库现场的用户因为在未停止数据库


的情况下,扩展磁盘 阵列,更换磁盘,导致


1


节点本地磁盘阵列挂不上,导致只


能一个节点使用数据库,需要重新配置


oracle


集群信息。





2




系统环境




项目名称



服务器名



操作系统



集群软件



服务器主机名



IP


地址(示例)




系统用户



系统组



RAC


节点


1


RedHat 6


Oracle GRID


his1



用户名



Root


Grid


oracle


dba


asmdba


asmadmin


oinstall


asmoper


RAC


节点


2


RedHat 6


Oracle GRID


his2




dba


asmdba


asmadmin


oinstall


asmoper






3




数据库环境




项目名称



服务器名称



公共


IP


地址



虚拟


IP


地址



心跳


IP


地址



ScanIP


地址



Oracle RAC SID


数据库名称



数据文件路径



归档文件



数据库版本



RAC


节点


1


RAC


节点


2









orcl1


orcl2


orcl


+DATA


+ARCH


Oracle


Database


11g


Enterprise


Edition


Release .0(64



)


GRID_BASE


目录



/u01/app/grid


GRID_HOME


目录



/u01/app/grid/


目录



/u01/app/oracle


ORACLE_HOME


目录



/u01/app/oracle /


数据库监听端口



1521


数据库字符集



ZHS16GBK < /p>


数据库用户



sys,system




oracle




数据库硬盘管理方式



ASM




4




实施步骤



4.1


操作系统准备工作



包括如下操作,< /p>


主要和


rac


安装文档相同,

< p>
如果需要重新安装操作系统,


请参考


rac


安装文档的操作,进行操作系统配置。



下面只列出:



4.1.1


配置


grid


用户及


oracle


用户等效性



Grid< /p>


用户


(his2


先删除

< br>.shh


目录


)


< p>
his1


上:



su - grid


$$ mkdir ~/.ssh


$$ chmod 700 ~/.ssh


$$ ssh-keygen -t rsa


$$ ssh-keygen -t dsa


$$ cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ cat ~/.ssh/ >> ~/.ssh/authorized_keys



his2


上:



$$ mkdir ~/.ssh


$$ chmod 700 ~/.ssh


$$ ssh-keygen -t rsa


$$ ssh- keygen -t dsa



his1

上:



$$ ssh jkkdb2 cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ ssh jkkdb2 cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ scp ~/.ssh/authorized_keys jkkdb2:~/.ssh/authorized_keys


验证



$$ ssh his1 date


$$ ssh his1-priv date


$$ ssh his2 date


$$ ssh his2-priv date



Oracle


用户


()




his1


上:



su - grid


$$ mkdir ~/.ssh


$$ chmod 700 ~/.ssh


$$ ssh-keygen -t rsa


$$ ssh- keygen -t dsa


$$ cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ cat ~/.ssh/ >> ~/.ssh/authorized_keys



his2


上:



$$ mkdir ~/.ssh


$$ chmod 700 ~/.ssh


$$ ssh- keygen -t rsa


$$ ssh-keygen -t dsa

< p>


his1


上:



$$ ssh jkkdb2 cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ ssh jkkdb2 cat ~/.ssh/ >> ~/.ssh/authorized_keys


$$ scp ~/.ssh/authorized_keys jkkdb2:~/.ssh/authorized_keys


验证



$$ ssh his1 date


$$ ssh his1-priv date


$$ ssh his2 date


$$ ssh his2-priv date




4.1.2

< br>设置


raw,


磁盘阵列



联系硬件厂家,扩展磁盘操作等等,两个机器的磁盘信息相同,主要是挂的

磁盘号要一致。



4.1.3


重启


his1


服务器



4.2


停止原来


1


节点


vip



$$ srvctl disable listener -l listener_name -n his1


$$ srvctl stop listener -l listener_name -n his1




4.3


删除原


1


节点数据库实例信息



oracle


用户执行:



$$dbca -silent -deleteInstance -nodeList his1 -gdbName orcl -insta


nceName orcl1 -sysDBAUserName sys -sysDBAPassword oracle


此时查看数据库信息:



$$srvctl config database -d orcl


Database unique name: orcl


Database name:


Oracle home: /oracle/product/ user: oracle


Spfile:


Domain:


Start options: open


Stop options: immediate


Database role: PRIMARY


Management policy: AUTOMATIC


Server pools: orcl


Database instances: his2 -----


原来是


h is1



his2


Disk Groups: DATA


Mount point paths:


Services:


Type: RAC


Database is administrator managed




4.4


清除


rac


信息



清除


grid


/grid/gridhome/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/


grid/gridhome



Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB. Actual 20480


MB Passed


The inventory pointer is located at /etc/


The inventory is located at /grid/gridbase/oraInventory


'UpdateNodeList' was successful.


清除


oracle


/oracle/product/ -updateNodeList ORACLE_HOME= /oracle/product/


LUSTER_NODES={his2}



Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB. Actual 20480


MB Passed


The inventory pointer is located at /etc/


The inventory is located at /oracle/oraInventory


'UpdateNodeList' was successful.



查看

/grid/gridhome/opmen/conf/


文件


usesharedinstall=true


allowgroup=true


localport=6100 # line added by Agent


remoteport=6200 # line added by Agent


nodes=his2:6200


# line added by Agent


如果还有


his1


信息,手工删除

< p>



4.5


清除


1


节点


vip



$$srvctl remove vip -i his1-vip


Please confirm that you intend to remove the VIPs his1-vip (y/[n])


y


4.6


检查当前集群信息



$$olsnodes -s



t



$$crs_stat



t



$$cluvfy stage -post nodedel -n his1 -verbose



Performing post- checks for node removal


Checking CRS integrity...


Clusterware version consistency passed


The Oracle Clusterware is healthy on node


CRS integrity check passed


Result:


Node removal check passed


Post-check for node removal was successful.


4.7


重新添加


1


节点到集群



4.7.1


添加


grid


软件


环境检查



$$cluvfy comp peer -refnode his2 -n his1 -verbose


$$cluvfy stage -pre nodeadd -n his1



verbose




/grid/gridhome/oui/bin


下 :



$$export IGNORE_PREADDNODE_CHECKS=Y


$$./ -silent


AMES={his1-vip}



Performing pre-checks for node addition


Checking node reachability...


Node reachability check passed from node


Checking user equivalence...


User equivalence check passed for user


Checking node connectivity...


Checking hosts config file...


Verification of the hosts config file successful


.


..




..


.



WARNING:A new inventory has been created on one or more nodes i


n this session. However, it has not yet been registered as the centra


l inventory of this system.


To register the new inventory please run the script at '/grid/gri


dbase/oraInventory/' with root privileges on nodes 'his1'.


If you do not register the inventory, you may not be able to upda


te or patch the products you installed.


The following configuration scripts need to be executed as the


oot


followed by a list of nodes.


/grid/gridbase/oraInventory/ #On nodes hxbak1


/grid/gridhome/ #On nodes his1


To execute the configuration scripts:


1. Open a terminal window


2. Log in as


3. Run the scripts in each cluster node


The Cluster Node Addition of /grid/gridhome was successful.


Please check '/tmp/' for more details.



his1


root


用户执行和两个脚本:



脚本执行过程略。



到这,

< p>
his1


上面


grid


已 经添加完成。


Asm


和监听


vip


等都启动了。



查看集群状态



[grid@his2 ~]$$ crs_stat -t


Name Type Target State Host



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


ora.... ONLINE ONLINE his1


ora.... ONLINE ONLINE his1


ora.... ONLINE ONLINE his1


ora.... ora.... ONLINE ONLINE his1

-


-


-


-


-


-


-


-



本文更新与2021-01-29 23:54,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/587970.html

OraclegRAC数据库节点损坏恢复的相关文章