签到成功

知道了

CNDBA社区CNDBA社区

ORACLE 12cR2单机补丁升级

2017-09-20 20:11 7634 0 原创 oracle维护
作者: shmily


数据库版本:12.2.0.1
补丁包:p26609817_122010_Linux-x86-64.zip

一·环境检查
为了保证打补丁,需要先设置可执行权限的路径

export PATH=$PATH:/usr/ccs/bin

检查psu是否有冲突
unzip p26609817_122010_Linux-x86-64.zip

避免权限问题,解压出来的文件给了777权限

chmod -R 777 26609817/
检查psu冲突,在oracle用户下

cd 26609817

[oracle@DB-DW-0-75 26609817]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oracle/app/oracle/product/12.2.0/db_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.2.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.6
OUI version       : 12.2.0.1.4
Log file location : /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-30-58PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.



二·补丁安装

oracle 单机模式下


[oracle@DB-DW-0-75 26609817]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/app/oracle/product/12.2.0/db_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.2.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.6
OUI version       : 12.2.0.1.4
Log file location : /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-42-20PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   26609817  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/app/oracle/product/12.2.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '26609817' to OH '/oracle/app/oracle/product/12.2.0/db_1'

Patching component oracle.oracore.rsf, 12.2.0.1.0...

Patching component oracle.ctx, 12.2.0.1.0...

Patching component oracle.rdbms.deconfig, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rman, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.rdbms.util, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.tfa, 12.2.0.1.0...

Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patch 26609817 successfully applied.
Log file location: /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-42-20PM_1.log

OPatch succeeded.

在数据库中执行修改的sql
sqlplus /nolog
SQL>startup
SQL>exit
cd $ORACLE_HOME/OPatch 
./datapatch -verbose

执行成功后,可以在dba_registry_sqlpatch视图中看到psu的信息

处理OJVM patche
SQL > @dbmsjdev.sql
SQL > exec dbms_java_dev.disable

遇到的问题:

1.psu冲突检查不通过

[oracle@DB-DW-0-75 ~]$ /oracle/app/oracle/product/12.2.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oracle/app/oracle/product/12.2.0/db_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.2.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.6
OUI version       : 12.2.0.1.4
Log file location : /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-23-51PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" is not executed.

The details are:
Unable to create Patch Object.
Exception occured : PatchObject constructor: Input file "/home/oracle/.java/etc/config/actions" or "/home/oracle/.java/etc/config/inventory" does not exist.

OPatch failed with error code 2


原因:没有设置可执行权限路径

设置路径
export PATH=$PATH:/usr/ccs/bin
重新检查,成功




2.打补丁包不通过

[oracle@DB-DW-0-75 26609817]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/app/oracle/product/12.2.0/db_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.2.0/db_1/oraInst.loc
OPatch version    : 12.2.0.1.6
OUI version       : 12.2.0.1.4
Log file location : /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-39-32PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
UtilSession failed: 
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-39-32PM_1.log


解决方式:
检查日志/oracle/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-09-20_16-39-32PM_1.log,发现其中有一段:

[Sep 20, 2017 4:32:14 PM]    Missing command :fuser
[Sep 20, 2017 4:32:14 PM]    Prerequisite check "CheckSystemCommandAvailable" failed.
                             The details are:
                             Missing command :fuser
[Sep 20, 2017 4:32:14 PM]    OUI-67073:UtilSession failed: 
                             Prerequisite check "CheckSystemCommandAvailable" failed.

使用find在服务器上查找fuser命令,没有找到,使用yum search fuser查找相关包  
[root@DB-DW-0-75 ~]# yum search fuser
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
=============================================== Matched: fuser ================================================
dislocker.x86_64 : Utility to access BitLocker encrypted volumes
fuse-dislocker.x86_64 : FUSE filesystem to access BitLocker encrypted volumes
psmisc.x86_64 : Utilities for managing processes on your system	
 
缺少psmisc.x86_64包,安装

[root@DB-DW-0-75 ~]# yum install psmisc

包安装完之后,重新打补丁,成功。

 
http://www.cndba.cn/asker/article/2246
http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246 http://www.cndba.cn/asker/article/2246
http://www.cndba.cn/asker/article/2246

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle12c psu

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
shmily

shmily

关注
  • 22
    原创
  • 0
    翻译
  • 2
    转载
  • 11
    评论
  • 访问:142155次
  • 积分:141
  • 等级:初级会员
  • 排名:第23名
精华文章
    热门文章
      Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

      AI QQ群