oracle11.2.0.4补丁升级11.2.0.4.8

 

1.数据库当前版本

SQL> select * from v$version;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE    11.2.0.4.0      Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

2.上传11.2.0.4.8补丁包并解压

[oracle@zyx install]$ unzip p21352635_112040_Linux-x86-64\(11.2.0.4.8_db\).zip

 

3.查看补丁升级官方文档说明

[oracle@zyx 21352635]$ firefox README.html

仔细阅读文档,了解升级前的注意事项。其中文档中要求OPatch版本在11.2.0.3.6以上应用这个补丁

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.

For information about OPatch documentation, including any known issues, see My Oracle Support Document 293369.1 OPatch documentation list.

4.查看OPatch版本,并升级OPatch

[oracle@zyx 21352635]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version                                

OPatch Version: 11.2.0.3.4

OPatch succeeded.

----版本过低,需要先升级OPatch版本,按照文档要求,官方找到p6880880包下载

 

----下载后,上传并解压

[oracle@zyx install]$ unzip p6880880_112000_Linux-x86-64.zip

[oracle@zyx OPatch]$ pwd

/install/OPatch

[oracle@zyx OPatch]$ more README.txt     ------查看说明文档

 

How to install the utility:

---------------------------

To install this patch, Please extract the file "zipped file" using unzip or winzip,

depending upon the platform. You should extract the zip file directly under the

ORACLE_HOME. Please follow the following steps for extracting the zip file of OPatch.

(1) Please take a backup of $ORACLE_HOME/OPatch into a dedicated backup

location.

(2) Please remove the contents of $ORACLE_HOME/OPatch directory (Please do not

remove $ORACLE_HOME/OPatch directory itself)

(3) Please unzip the OPatch downloaded zip into $ORACLE_HOME directory.

To check the version of the opatch utility installed in the above step,

go to the $ORACLE_HOME/OPatch directory and run "opatch version".

 

----文档中说,可以先将$ORACLE_HOME/OPatch下的文件拷贝到其他路径备份,然后将下载的新版本覆盖该目录

----当然,如果不做备份,也可以直接将新版本解压覆盖$ORACLE_HOME/OPatch

[oracle@zyx install]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME

Archive:  p6880880_112000_Linux-x86-64.zip

replace /u01/app/oracle/product/11.2.0/db_1/OPatch/jlib/oracle.opatch.classpath.jar? [y]es, [n]o, [A]ll, [N]one, [r]ename: A

 

----再次检查一下版本

[oracle@zyx install]$ $ORACLE_HOME/OPatch/opatch version

OPatch Version: 11.2.0.3.6

OPatch succeeded.

 

5.检测PSU补丁是否与当前环境存在冲突

[oracle@zyx 21352635]$ /u01/app/oracle/product/11.2.0/db_1/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/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/opatch2016-04-23_04-13-36AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail"not executed

Unable to create Patch Object.

Exception occured : PatchObject constructor: Input file "/install/etc/config/actions" or "/install/etc/config/inventory" does not exist.

OPatch succeeded.

 

6.关闭所有db组件

[oracle@zyx install]$ emctl stop dbconsole                               

[oracle@zyx install]$ lsnrctl stop

SQL> shut immediate

 

7.开始升级

----在补丁目录下应用补丁

[oracle@zyx 21352635]$ $ORACLE_HOME/OPatch/opatch apply

 

----应用补丁成功之后,执行catbundle.sql将补丁信息反射到数据库中,使数据库知道你最后一次打了什么补丁或者回滚了哪些补丁:

SQL> startup

SQL> @?/rdbms/admin/catbundle.sql psu apply

 

----完成后,启动监听、EM

SQL> ho lsnrctl start

SQL> ho emctl start dbconsole

 

8.查看升级后版本

SQL> select action,comments from registry$history;

ACTION                         COMMENTS

--------------                                                                                             ----------------

APPLY                          Patchset 11.2.0.2.0

APPLY                          Patchset 11.2.0.2.0

APPLY                          PSU 11.2.0.4.8

 

SQL> select * from dba_registry_history;

 

[oracle@zyx 21352635]$ $ORACLE_HOME/OPatch/opatch lspatches

21352635;Database Patch Set Update : 11.2.0.4.8 (21352635)

 

[oracle@zyx ~]$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch/

[oracle@zyx 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/opatch2016-04-23_04-51-35AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-04-23_04-51-35AM.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  21352635     : applied on Sat Apr 23 04:28:47 CST 2016

Unique Patch ID:  19227862

Patch description:  "Database Patch Set Update : 11.2.0.4.8 (21352635)"

   Created on 1 Sep 2015, 07:49:44 hrs

Sub-patch  20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"

Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"

Sub-patch  19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"

Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"

Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"

Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"

Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"

   Bugs fixed:

     17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699

     17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817

     16992075, 17446237, 14015842, 19972569, 21538558, 20925795, 17449815

     17375354, 19463897, 17982555, 17235750, 13866822, 18317531, 17478514

     18235390, 14338435, 20803583, 13944971, 20142975, 17811789, 16929165

     18704244, 20506706, 17546973, 20334344, 14054676, 17088068, 18264060

     17346091, 17343514, 21538567, 19680952, 18471685, 19211724, 13951456

     16315398, 18744139, 16850630, 19049453, 18673304, 17883081, 19915271

     18641419, 18262334, 17006183, 16065166, 18277454, 16833527, 10136473

     18051556, 17865671, 17852463, 18554871, 17853498, 18334586, 17588480

     17551709, 19827973, 17842825, 17344412, 18828868, 17025461, 11883252

     13609098, 17239687, 17602269, 19197175, 18316692, 17313525, 12611721

     19544839, 18964939, 17600719, 18191164, 19393542, 17571306, 18482502

     20777150, 19466309, 17040527, 17165204, 18098207, 16785708, 17174582

     16180763, 17465741, 16777840, 12982566, 19463893, 12816846, 16875449

     17237521, 19358317, 17811438, 17811447, 17945983, 18762750, 17184721

     16912439, 18061914, 17282229, 18331850, 18202441, 17082359, 18723434

     19554106, 14034426, 18339044, 19458377, 17752995, 20448824, 17891943

     17258090, 17767676, 16668584, 18384391, 17040764, 17381384, 15913355

     18356166, 14084247, 20506715, 13853126, 18203837, 14245531, 16043574

     17848897, 17877323, 17468141, 17786518, 17912217, 17037130, 18155762

     16956380, 17478145, 17394950, 18189036, 18641461, 18619917, 17027426

     21352646, 16268425, 19584068, 18436307, 17265217, 17634921, 13498382

     20004087, 17443671, 18000422, 20004021, 17571039, 21067387, 16344544

     18009564, 14354737, 18135678, 18614015, 20441797, 18362222, 17835048

     16472716, 17936109, 17050888, 17325413, 14010183, 18747196, 17761775

     16721594, 17082983, 20067212, 21179898, 17302277, 18084625, 15990359

     18203835, 17297939, 17811456, 16731148, 17215560, 13829543, 14133975

     17694209, 18091059, 17385178, 8322815, 17586955, 17201159, 17655634

     18331812, 19730508, 18868646, 17648596, 16220077, 16069901, 17348614

     17393915, 17274537, 17957017, 18096714, 17308789, 18436647, 14285317

     19289642, 14764829, 18328509, 17622427, 16943711, 14368995, 17346671

     18996843, 17783588, 16618694, 17672719, 18856999, 18783224, 17851160

     17546761, 17798953, 18273830, 19972566, 16384983, 17726838, 17360606

     13645875, 18199537, 16542886, 17889549, 14565184, 17071721, 20299015

     17610798, 20657441, 17397545, 18230522, 16360112, 19769489, 12905058

     18641451, 12747740, 18430495, 17042658, 17016369, 14602788, 19972568

     18508861, 19788842, 14657740, 17332800, 13837378, 19972564, 17186905

     18315328, 19699191, 17437634, 19006849, 19013183, 17296856, 18674024

     17232014, 16855292, 21051840, 14692762, 17762296, 17705023, 19121551

     19854503, 19309466, 18681862, 18554763, 20558005, 17390160, 18456514

     16306373, 13955826, 18139690, 17501491, 17299889, 17752121, 17889583

     18673325, 18293054, 17242746, 17951233, 17649265, 18094246, 19615136

     17011832, 16870214, 17477958, 18522509, 20631274, 16091637, 17323222

     16595641, 16524926, 18228645, 18282562, 17596908, 17156148, 18031668

     16494615, 17545847, 17614134, 13558557, 17341326, 17891946, 17716305

     16392068, 19271443, 18092127, 18440047, 17614227, 14106803, 16903536

     18973907, 18673342, 17389192, 16194160, 17006570, 17612828, 17721717

     17570240, 17390431, 16863422, 18325460, 19727057, 16422541, 19972570

     17267114, 18244962, 21538485, 18765602, 18203838, 16198143, 17246576

     14829250, 17835627, 18247991, 14458214, 21051862, 16692232, 17786278

     17227277, 16042673, 16314254, 16228604, 16837842, 17393683, 17787259

     20331945, 20074391, 15861775, 16399083, 18018515, 18260550, 21051858

     17036973, 16613964, 17080436, 16579084, 18384537, 18280813, 20296213

     16901385, 15979965, 18441944, 16450169, 9756271, 17892268, 11733603

     16285691, 17587063, 16538760, 18180390, 18193833, 21051833, 17238511

     17824637, 16571443, 18306996, 14852021, 18674047, 17853456, 12364061

--------------------------------------------------------------------------------

OPatch succeeded.

 

9.检测失效对象,编译

col owner for a10

col object_type for a15

col object_name for a30

col status for a20

select owner,object_type,object_name,status

                from dba_objects

                where status<>'VALID'

                order by owner,object_type,object_name;

 

----如果有失效对象,可以执行下面脚本编译

SQL> @?/rdbms/admin/utlrp.sql

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30130773/viewspace-2107427/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30130773/viewspace-2107427/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值