ORACLE PSU升级总结

首先,进行PSU,首要的事情就是认真的看readme.html,从里面我们可以知道很详细的升级步骤已经回退的方案。并且避免了很多的坑

在进行PSU之前,要首先确认你准备升级的版本以及你自己系统数据库的版本,就像我们这次,是从11.2.0.4.0升级到11.2.0.4.2版本,从MOS上去找到相应的PATCH

p18031668_112040_Linux-x86-64.zip

可以通过p后面的数字在mos上面很容易的查到该补丁包,从该版本的补丁包的readme.html 中。我们可以看到这样要求

2.1 OPatch Utility

You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.

由于我们是用的系统盘直接装的,默认的版本是这个:

[[email protected] OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4

版本是11.2.0.3.4 够不到PATCH的最低的安装版本,所以我们需要一个另外的PATCH来更新opatch的版本

Oracle 提供了这样的一个补丁包

p6880880_112000_Linux-x86-64.zip

用来把OPATCH提成到最新的版本

具体的单独升级ORACLE PSU的步骤:

1.把Opatch的环境变量配置
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
2.查看数据库的版本
opatch version
[[email protected]<span style="font-family: Arial, Helvetica, sans-serif;">storedb</span> OPatch]$ opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
opatch lsinventory
[[email protected] OPatch]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /opt/app/oracle/product/11.2.0/db_1
Central Inventory : /opt/oraInventory
   from           : /opt/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-07-07_10-44-39AM_1.log
Lsinventory Output file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-07-07_10-44-39AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
3.更新补丁工具包
cd $ORACLE_HOME/
mv OPatch OPath_bak
unzip p6880880_112000_LINUX.zip
cd OPatch
[[email protected] db_1]$ cd OPatch
[[email protected] OPatch]$ ls
crs  docs  emdpatch.pl  jlib  ocm  opatch  opatch.bat  opatchdiag  opatchdiag.bat  opatch.ini  opatch.pl  opatchprereqs  oplan  README.txt  version.txt
[[email protected] OPatch]$
[[email protected] OPatch]$ opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
4.检查你需要打的补丁是否与现有的补丁有冲突
unzip p18031668_112040_Linux-x86-64.zip
cd 18031668
[[email protected] 18031668]$ 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/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_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/db_1/cfgtoollogs/opatch/opatch2014-07-09_01-59-50AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
5.关闭数据库并更新最新的补丁
sqlplus / as sysdba
shutdown immediate
cd 18031668
opatch apply
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/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2/db_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/db_1/cfgtoollogs/opatch/17478514_Apr_02_2014_15_38_28/apply2014-04-02_15-38-28PM_1.log

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y

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

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...

Patching component oracle.xdk.rsf, 11.2.0.4.0...

Patching component oracle.rdbms.rman, 11.2.0.4.0...

OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/u01/app/oracle/product/11.2/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/u01/app/oracle/product/11.2/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'

Verifying the update...
Patch 17478514 successfully applied
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2/db_1/cfgtoollogs/opatch/17478514_Apr_02_2014_15_38_28/apply2014-04-02_15-38-28PM_1.log

OPatch completed with warnings.
6.查看补丁:
opatch lsinventory
[email protected] OPatch]$   opatch lsinventory
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/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_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/db_1/cfgtoollogs/opatch/opatch2014-07-09_02-10-23AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-07-09_02-10-23AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (1) :
Patch  18031668     : applied on Wed Jul 09 00:16:43 EDT 2014
Unique Patch ID:  17255543
Patch description:  "Database Patch Set Update : 11.2.0.4.2 (18031668)"
   Created on 20 Feb 2014, 05:15:58 hrs PST8PDT
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
   Bugs fixed:
     17288409, 16399083, 17205719, 17811429, 10136473, 16472716, 17614227
     17050888, 17040764, 17865671, 17325413, 14010183, 17726838, 13364795
     17389192, 17612828, 17080436, 16613964, 17284817, 17441661, 17761775
     17721717, 16721594, 17390431, 18203837, 17551709, 17344412, 16043574
     17446237, 16863422, 18139690, 17071721, 17501491, 17610798, 17239687
     17752121, 17468141, 17602269, 18203835, 17375354, 17313525, 17811456
     16731148, 14133975, 18203838, 16956380, 17385178, 17235750, 13866822
     17394950, 17478514, 17027426, 12905058, 14338435, 16450169, 13944971
     18094246, 16929165, 16785708, 17265217, 17465741, 16220077, 16180763
     16069901, 17546973, 16285691, 17323222, 18180390, 17088068, 16875449
     17016369, 17443671, 16228604, 17811438, 17811447, 16837842, 18031668
     16912439, 17332800, 17393683, 17622427, 17545847, 17186905, 16943711
     16850630, 17082359, 17346671, 14852021, 17783588, 17437634, 16618694
     17341326, 17296856, 17546761, 17716305
--------------------------------------------------------------------------------
7.执行catbundle.sql将补丁信息反射到数据库中,使数据库知道你最后一次打了什么补丁或者回滚了哪些补丁:
SQL> @?/rdbms/admin/catbundle.sql psu apply
SQL> Rem
SQL>
SQL> SET TERMOUT on
SQL> SET ECHO off
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
1 row selected.
1 row selected.
Generating apply and rollback scripts...
Check the following file for errors:
/u01/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_FTDB_GENERATE_2014Apr02_17_20_18.log
Apply script: /u01/app/oracle/product/11.2/db_1/rdbms/admin/catbundle_PSU_FTDB_APPLY.sql
Rollback script: /u01/app/oracle/product/11.2/db_1/rdbms/admin/catbundle_PSU_FTDB_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file...

1 row selected.

SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT
SQL> SELECT '/u01/app/oracle/cfgtoollogs/catbundle/' || 'catbundle_PSU_' || name || '_APPLY_' || TO_CHAR(SYSDATE, 'YYYYMonDD_hh24_mi_ss', 'NLS_DATE_LANGUAGE=''AMERICAN''') || '.log' AS spool_file FROM v$database;

1 row selected.

SQL> SPOOL &spool_file
SQL> exec dbms_registry.set_session_namespace('SERVER')

PL/SQL procedure successfully completed.

SQL> PROMPT Skipping Spatial because it is not installed or versions mismatch...
Skipping Spatial because it is not installed or versions mismatch...
SQL> ALTER SESSION SET current_schema = SYS;

Session altered.

SQL> PROMPT Updating registry...
Updating registry...
SQL> INSERT INTO registry$history
  2    (action_time, action,
  3     namespace, version, id,
  4     bundle_series, comments)
  5  VALUES
  6    (SYSTIMESTAMP, 'APPLY',
  7     SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
  8     '11.2.0.4',
  9     1,
 10     'PSU',
 11     'PSU 11.2.0.4.1');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:

这个是手动升级db的方法,对于有grid结构的数据库,我们可以通过OPATCH AUTO的方式来进行数据库的自动升级

时间: 2024-10-14 05:43:39

ORACLE PSU升级总结的相关文章

oracle数据库psu升级(本实验是将10.2.0.3.12升级到10.2.0.3.15)

psu升级(本实验是将10.2.0.3.12升级到10.2.0.3.15) 一.解压安装包自定义存放路径为/home/oracle/yjb/psu/10.2.0.3.15cd /home/oracle/yjb/psu/10.2.0.3.15unzip p6880880_112000_04-SEP-2015_Linux-x86-64.zipunzip p20760997_112030_15_Linux-x86-64.zip -d 1120315 二.检查psu补丁是否有冲突/home/oracle

Oracle升级_oracle 10g版本由 10.2.0.4.0升级为10.2.0.4.4(即PSU升级)

***************************************************************************************************** 续借上篇:Oracle升级_oracle 10g版本由 10.2.0.1.0升级为10.2.0.4.0(即CPU升级) ***********************************************声明***************************************

【Oracle】PSU升级过程

以下是该PSU的自述文件中的内容: 3.2 Patch Installation Instructions Follow these steps: If you are using a Data Guard Physical Standby database, you must install this patch on both the primary database and the physical standby database, as described by My Oracle S

一次误操作导致的gi psu升级失败

oracle使用opatch auto的方式安装gi psu时需要一个节点一个节点来,昨晚的升级中,因为误操作而是两节点同时安装gi psu,最终在补丁安装完成后,无法拉起crs. 选择进行补丁的rollback,结果悲剧的发现rollback的前提是需要crs启动的状态,无奈之下只能进行备份文件的恢复了. 不过因为意识的疏忽,压缩$oracle_home目录和$grid_home目录时没有使用root用户,导致部分文件没有备份出来. 以后打类似的psu,有两个注意点: 第一,一定要一个节点一个

oracle 10g升级cluster失败

今天升级一个10g的集群环境到10.2.0.5,网上下载补丁包p8202632_10205_Linux-x86-64.zip,解压后安装执行,中途报错: I/O ERROR cannt reading or opening file in /tmp/...../temp52 网上查资料如下: 根据MOS的说明,导致这个错误可能有如下原因: a) Insufficient free space in the temporarydirectory. b) Insufficient access ri

Oracle Study之--Oracle TimeZone升级

Oracle Study之--Oracle TimeZone升级 http://tiany.blog.51cto.com/513694/1411882  Oracle 10gR2升级到Oracle 11gR2       当Oracle database从10gR2升级到11gR2之后,需要升级timezone version,以下详细介绍了timezone的升级过程. Oracle timezone 升级 背景描述: 如果需要支持一个国际化的应用,那么数据库端的国际化特性的支持也就显得尤其重要

2014年第一季度Oracle PSU更新(包括10.2.0.4+版本号全部PSU信息)

2014年第一季度的PSU更新主要是3个版本号:12.1.11.2.0.4.11.2.0.3以及11.1.0.7. 在第2季度Oracle 将公布12.1.0.2,同一时候11.2.0.4版本号也将是11.2的终极版本号,不会再出11.2.0.5. 例如以下是我整理的最新的10.2.0.4+版本号的最新psu信息,供大家參考!(包括12c psu信息). ++++10.2.0.4 Oracle Database Patch Set Update Unix Comments Includes Cp

《oracle 9i 升级 10g 后续 - 建立 10g oracle enterprise manager》

摘要:<oracle 9i 升级 10g 后续 - 建立 10g oracle enterprise manager> 2009/6/21 直接安装 oracle 10g,默认会建立与9i不同的管理界面 今天想试用一下,却不知如何下手,请教google大神后,重建 oem. --------------------------------------------------------------------------------- 参考文章: http://hi.baidu.com/ter

Oracle11.2.0.1 PSU升级11.2.0.4

1.首先下载所需要的PSU包p6880880_112000_Linux-x86-64.zip patch包:p19121551_112040_Linux-x86-64-psu4.zip 2.解压p6880880_112000_Linux-x86-64.zip到$ORACLE_HOME目录下,将原有的备份 unzip -n p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME 3.查看版本号 [[email protected] OPatch]$ ./o