手动升级:
软件包解压在新建的/home/grid/update 目录下
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
GRID_HOME=/u01/app/11.2.0/grid/

一、ORACLE 11G R2 RAC 备份

DB: 11.2.0.4
OS: REDHAT 6.X
PATCH: 20170718

建议:操作前停止所有应用服务,停止所有中间件服务,关闭监听。

1.1 数据库RMAN 全备,【见备份脚本】;

rman target / nocatalog log /home/oracle/rman_full.log <<EOF
run
{crosscheck backup;
crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt expired backup;
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup filesperset 6 database format '/backup/full_%d_%T_%s_%p.dbf';
sql 'alter system archive log current';
sql 'alter system archive log current';
backup archivelog from time 'sysdate-1/24' format '/backup/arch_%d_%T_%s_%p.arc';
backup current controlfile format '/backup/ctl_%d_%T_%s_%p.ctl';
backup spfile format '/backup/spfile_%d_%U';
restore database validate;
restore controlfile validate;
}
EOF

1.2 OCR 备份 【root用户执行备份】

OCR的自动备份:使用ocrconfig -showbackup查看ocr备份所在节点及路径
/u01/app/11.2.0/grid/bin/ocrconfig -showbackup

OCR的手动备份:
/u01/app/11.2.0/grid/bin/ocrconfig -manualbackup

备份完后查看新的备份:
/u01/app/11.2.0/grid/bin/ocrconfig -showbackup

如果OCR需要改变路径,建议导出这种方式:
/u01/app/11.2.0/grid/bin/ocrconfig -export /u01/ocr_20180124.ocr

1.3 OLR 备份
查看路径: /u01/app/11.2.0/grid/bin/ocrcheck -local
手工备份OLR: /u01/app/11.2.0/grid/bin/ocrconfig -local -manualbackup

1.4 备份安装软件目录
1、分别关闭实例
sqlplus / as sysdba
alter system checkpoint;
shutdown immediate;

2、分别 crsctl stop has
/u01/app/11.2.0/grid/bin/crsctl stop has

3、备份数据库所有安装目录(注意,保留权限)
先查看软件目录空间多大,再根目录空间是否足够。(root用户)

cd /
du -sm * | sort

备份安装软件目录:tar cvpzf oracle.tgz /u01
使用下面的命令来恢复系统:# tar xvpfz backup.tgz -C /

备份完后,两边开启集群资源。

/u01/app/11.2.0/grid/bin/crsctl start has

二、替换原有的grid用户和oracle用户下的Opatch

1、新建补丁包目录【2个节点都执行,都需要补丁包和opatch软件包】
mkdir -p /home/grid/update
chown -R grid:oinstall /home/grid/update
chmod 777 /home/grid/update

软件包解压在/home/grid/update 目录下

解压补丁包(root 用户)

unzip p27107360_112040_Linux-x86-64.zip

把解压的目录命名为:27107360

chown -R grid:oinstall /home/grid/update/27107360
unzip p6880880_112000_Linux-x86-64.zip

备份原有Opatch
mv /u01/app/11.2.0/grid/OPatch/ /u01/app/11.2.0/grid/OPatch.bak
mv /u01/app/oracle/product/11.2.0/dbhome_1/OPatch /u01/app/oracle/product/11.2.0/dbhome_1/OPatch.bak

copy新的OPatch到相应用户路径下
cp -R /home/grid/update/OPatch /u01/app/11.2.0/grid/OPatch
cp -R /home/grid/update/OPatch /u01/app/oracle/product/11.2.0/dbhome_1/OPatch

赋予新的OPatch文件权限。
chown -R grid:oinstall /u01/app/11.2.0/grid/OPatch
chmod 755 /u01/app/11.2.0/grid/OPatch

chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/dbhome_1/OPatch
chmod 755 /u01/app/oracle/product/11.2.0/dbhome_1/OPatch

查看替换后的 OPatch

ls -lh /u01/app/11.2.0/grid/
ls -lh /u01/app/oracle/product/11.2.0/dbhome_1

3、预检查
grid:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/update/27107360/26609929
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/update/27107360/22502505
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/update/27107360/26925576

oracle:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/update/27107360/26925576
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/update/27107360/26609929/custom/server/26609929

三、手工补丁升级

Manual Steps for Apply Patch

3.1、Stop the CRS managed resources running from DB homes. If this is a GI Home environment, as the database home owner execute:

oracle 两个节点执行:

$ORACLE_HOME/bin/srvctl stop home -o $ORACLE_HOME -s /home/oracle/update/1.txt -n rac1
$ORACLE_HOME/bin/srvctl stop home -o $ORACLE_HOME -s /home/oracle/update/2.txt -n rac2

3.2、Run the pre root script. If this is a GI Home, as the root user execute:

root 两节点执行:

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock

3.3、Apply the CRS patch using. As the GI home owner execute:

grid 两节点执行:

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /home/grid/update/27107360/26609929

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /home/grid/update/27107360/22502505

$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/update/27107360/26925576

3.4、Run the pre script for DB component of the patch. As the database home owner execute:

oracle 两节点执行:

/home/grid/update/27107360/26609929/custom/server/26609929/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME

3.5、Apply the DB patch. As the database home owner execute:

oracle 两节点执行:

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /home/grid/update/27107360/26609929/custom/server/26609929
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /home/grid/update/27107360/26925576

3.6、Run the post script for DB component of the patch. As the database home owner execute:

oracle 两节点执行:

/home/grid/update/27107360/26609929/custom/server/26609929/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME

3.7、Run the post script. As the root user execute:

root:

/u01/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
/u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch

3.8、Start the CRS managed resources that were earlier running from DB homes. If this is a GI Home environment, as the database home owner execute:

oracle 两节点执行:

$ORACLE_HOME/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/update/1.txt -n rac1
$ORACLE_HOME/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/update/2.txt -n rac2

3.9、检查

As the Oracle Grid Infrastructure owner, run the following command:

grid:

/u01/app/11.2.0/grid/OPatch/opatch lsinventory

oracle:

/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory

3.11、数据库的应用PSU
在任意一台节点用oracle用户连接到数据库上(只需在一台节点执行一次,不需要所有节点都执行):

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @?/rdbms/admin/catbundle.sql psu apply

查看应用的psu

set line 150
col ACTION_TIME for a30
col ACTION for a8
col NAMESPACE for a8
col VERSION for a10
col BUNDLE_SERIES for a5
col COMMENTS for a20
select * from dba_registry_history;

编译无效的对象:

SQL>@?/rdbms/admin/utlrp.sql

如果升级的补丁有报错,查看一下日志:

cd $ORACLE_BASE/cfgtoollogs/catbundle

catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log

3.12、如果使用了RMAN,需要将RMAN catalog库升级一下,执行:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;

11g Rac PSU20180116手动补丁升级步骤的更多相关文章

  1. sharepoint 2013 补丁升级步骤

    1. 安装过程合理: A. 可以同时在管理中心.两台前端.搜索服务器上安装重新发布的SP1补丁包(所提供的链接) B. 等待所有SP1补丁包安装完成,依次在管理中心.两台前端.搜索服务器上运行配置向导 ...

  2. Oracle 11g RAC 环境打PSU补丁的详细步骤

    首先重要的事情说三遍:操作之前还是自己先看文档!操作之前还是自己先看文档!!操作之前还是自己先看文档!!! 把11.2.0.4 RAC 环境打PSU补丁的步骤详细记录一下,方便参考. 环境:11.2. ...

  3. Oracle 11g RAC 应用补丁简明版

    之前总结过<Oracle 11.2.0.4 RAC安装最新PSU补丁>, 这次整理为简明版,忽略一切输出的显示,引入一些官方的说明,增加OJVM PSU的补丁应用. 环境:RHEL6.5 ...

  4. Oracle 11g RAC 自动应用PSU补丁简明版

    环境:Oracle RAC(GI 11.2.0.4 + DB 11.2.0.4) 本文应用补丁信息: Patch 23615403 - Combo of OJVM Component 11.2.0.4 ...

  5. Weblogic 升级更新补丁操作步骤

    转至:https://blog.csdn.net/allway2/article/details/91424413 Weblogic 升级更新补丁操作步骤: 1.上传补丁包2.kill weblogi ...

  6. Oracle 11g RAC停止和启动步骤

    关闭前备份控制文件/参数文件:   sqlplus / as sysdba alter database backup controlfile to '/home/oracle/control.ctl ...

  7. oracle 11g RAC 的一些基本概念(四)

    RAC   在Grid Infrastructure安装完以后,我们把注意力转移到集群上的Oracle软件的安装上来.我们看到,Grid Infrasctructure提供了运行RAC的框架,包括集群 ...

  8. linux下通过脚本方式对中间件weblogic进行补丁升级

    转至:http://bbs.learnfuture.com/topic/48 linux下通过脚本方式对中间件weblogic进行补丁升级 刘五奎 [摘要] 在运维行业,系统或软件漏洞每每牵动着每一个 ...

  9. 【Oracle 集群】ORACLE DATABASE 11G RAC 知识图文详细教程之RAC 特殊问题和实战经验(五)

    RAC 特殊问题和实战经验(五) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总.然后形成体 ...

随机推荐

  1. Deutsch lernen (15)

    1.    unterscheiden - unterschied - unterschieden  区别,区分:(能够)分清 Die beiden Begriffe sind nur schwer ...

  2. js动态操作订单表格

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. BZOJ 1645: [Usaco2007 Open]City Horizon 城市地平线 扫描线 + 线段树 + 离散化

    Code: #include<cstdio> #include<algorithm> #include<string> #define maxn 1030000 # ...

  4. Day 19 numpy 模块

    numpy 模块(多维数组) import numpy as np arr=np.array([1,2,3,4],[5,6,7,8]) print(arr) #[[1 2 3 4] #[5 6 7 8 ...

  5. 15.5.2 【Task实现细节】骨架方法的结构

    尽管骨架方法中的代码非常简单,但它暗示了状态机的职责.代码清单15-11生成的骨架方 法如下所示: [DebuggerStepThrough] [AsyncStateMachine(typeof(De ...

  6. [Cerc2007]robotic sort

    splay区间反转练手题 #include <iostream> #include <cstdio> #include <algorithm> using name ...

  7. 爬虫系列(七) requests的基本使用

    一.requests 简介 requests 是一个功能强大.简单易用的 HTTP 请求库,可以使用 pip install requests 命令进行安装 下面我们将会介绍 requests 中常用 ...

  8. react-native页面间传递数据的几种方式

    1. 利用react-native 事件DeviceEventEmitter 监听广播 应用场景: - 表单提交页面, A页面跳转到B页面选人, 然后返回A页面, 需要将B页面选择的数据传回A页面. ...

  9. 【Codeforces 639A】Bear and Displayed Friends

    [链接] 我是链接,点我呀:) [题意] [题解] 时刻维护一下前K大的数字就好. 因为k<=6 然后数字不会减少只会增加. 因此只要维护一个大小为k的数组就ok. 保证这个数组是有序的. 写个 ...

  10. (37)Spring Boot集成EHCache实现缓存机制【从零开始学Spring Boot】

    [本文章是否对你有用以及是否有好的建议,请留言] 写后感:博主写这么一系列文章也不容易啊,请评论支持下. 如果看过我之前(35)的文章这一篇的文章就会很简单,没有什么挑战性了. 那么我们先说说这一篇文 ...