11g Rac PSU20180116手动补丁升级步骤
手动升级:
软件包解压在新建的/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手动补丁升级步骤的更多相关文章
- sharepoint 2013 补丁升级步骤
1. 安装过程合理: A. 可以同时在管理中心.两台前端.搜索服务器上安装重新发布的SP1补丁包(所提供的链接) B. 等待所有SP1补丁包安装完成,依次在管理中心.两台前端.搜索服务器上运行配置向导 ...
- Oracle 11g RAC 环境打PSU补丁的详细步骤
首先重要的事情说三遍:操作之前还是自己先看文档!操作之前还是自己先看文档!!操作之前还是自己先看文档!!! 把11.2.0.4 RAC 环境打PSU补丁的步骤详细记录一下,方便参考. 环境:11.2. ...
- Oracle 11g RAC 应用补丁简明版
之前总结过<Oracle 11.2.0.4 RAC安装最新PSU补丁>, 这次整理为简明版,忽略一切输出的显示,引入一些官方的说明,增加OJVM PSU的补丁应用. 环境:RHEL6.5 ...
- 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 ...
- Weblogic 升级更新补丁操作步骤
转至:https://blog.csdn.net/allway2/article/details/91424413 Weblogic 升级更新补丁操作步骤: 1.上传补丁包2.kill weblogi ...
- Oracle 11g RAC停止和启动步骤
关闭前备份控制文件/参数文件: sqlplus / as sysdba alter database backup controlfile to '/home/oracle/control.ctl ...
- oracle 11g RAC 的一些基本概念(四)
RAC 在Grid Infrastructure安装完以后,我们把注意力转移到集群上的Oracle软件的安装上来.我们看到,Grid Infrasctructure提供了运行RAC的框架,包括集群 ...
- linux下通过脚本方式对中间件weblogic进行补丁升级
转至:http://bbs.learnfuture.com/topic/48 linux下通过脚本方式对中间件weblogic进行补丁升级 刘五奎 [摘要] 在运维行业,系统或软件漏洞每每牵动着每一个 ...
- 【Oracle 集群】ORACLE DATABASE 11G RAC 知识图文详细教程之RAC 特殊问题和实战经验(五)
RAC 特殊问题和实战经验(五) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总.然后形成体 ...
随机推荐
- mvc登录授权特性
public class CommonAuthorize : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContex ...
- react 基础篇 #2 create-react-app
1. 介绍 在开发react应用时,应该没有人用传统的方法引入react的源文件(js),然后在html编辑吧. 大家都是用webpack + es6来结合react开发前端应用. 这个时候,我们可以 ...
- PHP共享内存
如何使用 PHP shmop 创建和操作共享内存段,使用它们存储可供其他应用程序使用的数据. 1. 创建内存段 共享内存函数类似于文件操作函数,但无需处理一个流,您将处理一个共享内存访问 ID.第一个 ...
- Idea中修改servlet模板
1.点击左上角的File: Setting --> Editor --> File and Code Templates --> Other --> web -->Ser ...
- Django MVC与MTV概念 Ajax、分页实现
MVC与MTV概念 MTV与MVC(了解) MTV模型(django): M:模型层(models.py) T:templates ...
- cd:切换目录
cd命令 1.命令详解 [功能说明] cd命令是“change directory”中每个单词的首字母缩写,其功能是从当前工作目录切换到指定的工作目录. [语法格式] cd [option] ...
- Deepin & ROMS 安装详细流程
按照这个过程,完美安装,当然并不能排除会出现其他的问题.如果遇到了,那就老老实实上网搜吧.
- 洛谷 P1129 BZOJ 1059 cogs 660 [ZJOI2007]矩阵游戏
题目描述 小Q是一个非常聪明的孩子,除了国际象棋,他还很喜欢玩一个电脑益智游戏――矩阵游戏.矩阵游戏在一个N*N黑白方阵进行(如同国际象棋一般,只是颜色是随意的).每次可以对该矩阵进行两种操作: 行交 ...
- MySQL备份 博客---MYSQLDBA 黄杉
http://blog.csdn.net/mchdba/article/category/1598781
- matplotlib的cmap
今天又看到了这样的代码: plt.imshow(X_train[0], cmap=plt.get_cmap('PuBuGn_r')) #plt.imshow(X_train[0], cmap=plt. ...