oracle单机11.2.0.4.0升级到11.2.0.4.7

[oracle@single 20760982]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_21-40-28PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckMinimumOPatchVersion" failed.
The details are:


The OPatch being used has version 11.2.0.3.4 while the following patch(es) require higher versions: 
Patch 17478514 requires OPatch version 11.2.0.3.5.
Patch 18031668 requires OPatch version 11.2.0.3.5.
Patch 18522509 requires OPatch version 11.2.0.3.5.
Patch 19121551 requires OPatch version 11.2.0.3.5.
Patch 19769489 requires OPatch version 11.2.0.3.5.
Patch 20299013 requires OPatch version 11.2.0.3.5.
Patch 20760982 requires OPatch version 11.2.0.3.5.
Please download latest OPatch from My Oracle Support.

UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed.
Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_21-40-28PM_1.log

OPatch failed with error code 73

提示OPath的版本太低了,那就下载要求的OPath版本

[oracle@single 20760982]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch version
OPatch Version: 11.2.0.3.4

OPatch succeeded.
原来版本确实低了。

下载新的版本,解压,使用

p6880880_112000_Linux-x86-64.zip
[oracle@single OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.6

OPatch succeeded.

[oracle@single 20760982]$ /usr/liming/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_22-06-29PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

仍然报错:
[oracle@single 20760982]$ ../OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_22-09-20PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:


Following executables are active :
/u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_22-09-20PM_1.log

OPatch failed with error code 73

看报错,就知道问题了,我粗心,没有关闭数据库。

[oracle@single 20760982]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-SEP-2015 22:20:45

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=single)(PORT=1521)))
The command completed successfully

SQL> shutdown immediate                     
Database closed.
Database dismounted.
ORACLE instance shut down.

再来一次:

还是报相同的错误,使用fuser和lsof检查


[oracle@single 20760982]$ fuser /u01/app/oracle/product/11.2.0/dbhome_1/bin/oracle
[oracle@single 20760982]$ fuser /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1:  1542m
[oracle@single 20760982]$ lsof /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /root/.gvfs
      Output information may be incomplete.
COMMAND  PID   USER  FD   TYPE DEVICE SIZE/OFF    NODE NAME
sqlplus 1542 oracle mem    REG    8,3 53793682 4329961 /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
暴力搞定,继续执行

[oracle@single 20760982]$ ../OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-09-28_22-29-07PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  

Do you want to proceed? [y|n]

然后接下来的事情就是水到渠成了。

打ing

省略。。。。

OPatch succeeded.

检查:

[oracle@single 20760982]$ ../OPatch/opatch lspatches
20760982;Database Patch Set Update : 11.2.0.4.7 (20760982)

SQL> alter system register;
SQL> @?/rdbms/admin/catbundle.sql psu apply

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  20760982     : applied on Mon Sep 28 22:38:02 CST 2015
Unique Patch ID:  18908105
Patch description:  "Database Patch Set Update : 11.2.0.4.7 (20760982)"

成功!

你可能感兴趣的:(psu)