您的位置:首页 > 数据库 > Oracle

oracle 11g 补丁更新步骤

2018-06-06 17:12 141 查看
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_37570923/article/details/80597936
1.检查OPatch版本需要跟踪对应补丁的README说明,确定当前环境的OPatch版本符合要求,如果不符合要求,需要下载符合要求的OPatch版本。
1.1 查询OPatch版本$ORACLE_HOME/OPatch/opatch version
1.2 替换为新版本OPatch(GRID_HOME and ORACLE_HOME)备份原来的OPatch,解压新版本OPatch到$ORACLE_HOME下,检查OPatch的版本:mv $ORACLE_HOME/OPatch/ $ORACLE_HOME/OPatch/OPatchbk cp $ORACLE_HOME/OPatch/ $ORACLE_HOME chown -R grid:oinstall OPatch chmod 755 OPatch$ORACLE_HOME/OPatch/opatch version
2. 解压补丁文件并且授权# unzip p27475913_112040_Linux-x86-64.zipchown -R grid:oinstall 27475913chmod 775 27475913
3.确认停止oem---查看oem运行状态:$ORACLE_HOME/bin/emctl status dbconsole---如果是运行状态,则需要关闭:$ORACLE_HOME/bin/emctl stop dbconsole(一般是在oracle用户登录1节点停止em)
4.本次PSU补丁说明27441052;OCW PATCH SET UPDATE: 11.2.0.4.180417 (27441052)27338049;Database Patch Set Update : 11.2.0.4.180417 (27338049)22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
5. 安装前检查是否冲突$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
6. 手动应用补丁6.1 停止crs---Stop the CRS managed resources running from DB homes. If this is a GI Home environment, as the database home owner execute:$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>
6.2 运行rootcrs.pl---Run the pre root script. If this is a GI Home, as the root user execute:# <GI_HOME>/crs/install/rootcrs.pl -unlock---停止节点1的服务su - root# <GI_HOME>/crs/install/rootcrs.pl -unlock
6.3 应用CRS补丁---Apply the CRS patch using. As the GI home owner execute:$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>As the GI home owner execute:$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>As the GI home owner execute:$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCAT 4000 ION>/<GI_PSU_number>/<DB_PSU_number>
---grid用户登录,打对应补丁:su - grid$ /u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/app/stage/27475913/22502505/$ /u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/app/stage/27475913/27338049/$ /u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/app/stage/27475913/27441052/
6.4 补丁安装前执行脚本---.Run the pre script for DB component of the patch. As the database home owner execute:$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>---Oracle用户登录,补丁安装前检查:su - oracle$ /u01/app/stage/27475913/27441052/custom/server/27441052/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
6.5 应用db补丁$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>$ <ORACLE_HOME>/OPatch/opatch apply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>---oracle用户登录,打对应补丁:$ /u01/app/oracle/product/11.2.0.4/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/app/stage/27475913/27441052/custom/server/27441052/$ /u01/app/oracle/product/11.2.0.4/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/app/stage/27475913/27338049/ 6 .6 补丁安装后执行脚本---.Run the post script for DB component of the patch. As the database home owner execute:$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>oracle用户登录,补丁修复完确定:$ /u01/app/stage/27475913/27441052/custom/server/27441052/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
7.root用户执行脚本---.Run the post script. As the root user execute:# <GI_HOME>/rdbms/install/rootadd_rdbms.shIf this is a GI Home, as the root user execute:# <GI_HOME>/crs/install/rootcrs.pl -patchIf this is an Oracle Restart Home, as the root user execute:# <GI_HOME>/crs/install/roothas.pl -patchroot用户登录,执行脚本:su - root# $GRID_HOME/rdbms/install/rootadd_rdbms.sh# $GRID_HOME/crs/install/rootcrs.pl -patch

##########################################################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:$ /bin/srvctl start home -o -s -n If this is an Oracle Restart Home environment, as the database home owner execute:$ /bin/srvctl start home -o -s
8.升级数据字典---post patch8.1 升级数据字典(单节点运行)
cd $ORACLE_HOME/rdbms/adminsqlplus /nologCONNECT / AS SYSDBASTARTUP@catbundle.sql psu applyQUIT
8.2 重编译Java类.cd $ORACLE_HOME/rdbms/adminsqlplus /nologCONNECT / AS SYSDBA@utlrp.sql
############################################################################SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.005-JUN-18 05.04.34.287621 AM APPLY SERVER 11.2.0.4 171017 PSU PSU 11.2.0.4.17101706-JUN-18 01.01.54.058111 AM APPLY SERVER 11.2.0.4 180417 PSU PSU 11.2.0.4.180417




阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: