下面是我在打OPatch时使用的一般步骤,供大家参考:
1、停止
crs_stat -t
## running as oracle
srvctl stop instance -d -i
srvctl stop instance -d -i
srvctl stop nodeapps -n
srvctl stop nodeapps -n
## running as root(分别在2个节点执行)
$CRS_HOME/bin/crsctl stop crs
crs_stat -t
2、备份Oracle软件
(分别在2个节点执行)
mkdir
cd
## running as oracle
tar -cvf bak_inventory.tar $ORACLE_BASE/oraInventory/*
tar -cvf bak_home.tar $ORACLE_HOME/*
## running as root
tar -cvf bak_crs.tar $CRS_HOME/*
## backup voting-disk and OCR
(在某1个节点执行)
dd if=/dev/rora_ocr f=ocr.bak
dd if=/dev/rora_vote f=vote.bak
3、安装Oracle OPatch(分别在2个节点执行)
opatch lsinventory
opatch lsinventory
4、启动Oracle RAC(分别在2个节点执行)
## startup the RDBMS instances, listeners and nodeapps followed by CRS daemons on the local node (running as root)
$CRS_HOME/bin/crsctl start crs
crs_stat -t
5、如果出现问题,回退该补丁(分别在2个节点执行)
## Patch Deinstallation on the local node
6、如果步骤5无法回退,使用步骤2的进行恢复
(分别在2个节点执行)
cd
## running as oracle
tar -xvf bak_inventory.tar
tar -xvf bak_home.tar
## running as root
tar -xvf bak_crs.tar
dd if=ocr.bak f=/dev/rora_ocr
dd if=vote.bak f=/dev/rora_vote
备注:注意ocr和vote的属主
阅读(554) | 评论(0) | 转发(0) |