Oracle 10g(10.2.0.4)升级到10.2.0.5.19

一、将数据库版本从10.2.0.4 升级到 10.2.0.5,再升级到10.2.0.5.19

(1) 备份等过程略过,一个老库的升级过程,记录之。  
(2) 一致性关闭数据库及监听

sqlplus / as sysdba;  
shutdown immediate    
lsnrctl stop

二、升级数据库软件

1,解压p8202632_10205_Linux-x86-64.zip  
2,直接采用安装方式安装,覆盖原安装目录

xhost+  
su - oracle    
cd Disk1/    
./runInstaller

三、升级数据字典

1, 升级前检查

SQL> STARTUP UPGRADE  
SQL> SPOOL upgrade_info.log    
SQL> @?/rdbms/admin/utlu102i.sql

Oracle Database 10.2 Upgrade Information Utility    03-21-2016 10:27:05    
.    
**********************************************************************    
Database:    
**********************************************************************    
--> name:       ORCL    
--> version:    10.2.0.4.0    
--> compatible: 10.2.0.3.0    
--> blocksize:  8192    
.    
**********************************************************************    
Tablespaces: [make adjustments in the current environment]    
**********************************************************************    
--> SYSTEM tablespace is adequate for the upgrade.    
.... minimum required size: 488 MB    
.... AUTOEXTEND additional space required: 8 MB    
--> UNDOTBS1 tablespace is adequate for the upgrade.    
.... minimum required size: 401 MB    
.... AUTOEXTEND additional space required: 376 MB    
--> SYSAUX tablespace is adequate for the upgrade.    
.... minimum required size: 259 MB    
.... AUTOEXTEND additional space required: 9 MB    
--> TEMP tablespace is adequate for the upgrade.    
.... minimum required size: 58 MB    
.... AUTOEXTEND additional space required: 38 MB    
.    
**********************************************************************    
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]    
**********************************************************************    
-- No update parameter changes are required.    
.    
**********************************************************************    
Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]    
**********************************************************************    
-- No renamed parameters found. No changes are required.    
.    
**********************************************************************    
Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]    
**********************************************************************    
-- No obsolete parameters found. No changes are required    
.    
**********************************************************************    
Components: [The following database components will be upgraded or installed]    
**********************************************************************    
--> Oracle Catalog Views         [upgrade]  VALID    
--> Oracle Packages and Types    [upgrade]  VALID    
--> JServer JAVA Virtual Machine [upgrade]  VALID    
--> Oracle XDK for Java          [upgrade]  VALID    
--> Oracle Java Packages         [upgrade]  VALID    
--> Oracle Text                  [upgrade]  VALID    
--> Oracle XML Database          [upgrade]  VALID    
--> Oracle Workspace Manager     [upgrade]  VALID    
--> Oracle Data Mining           [upgrade]  VALID    
--> OLAP Analytic Workspace      [upgrade]  VALID    
--> OLAP Catalog                 [upgrade]  VALID    
--> Oracle OLAP API              [upgrade]  VALID    
--> Oracle interMedia            [upgrade]  VALID    
--> Spatial                      [upgrade]  VALID    
--> Expression Filter            [upgrade]  VALID    
--> EM Repository                [upgrade]  VALID    
--> Rule Manager                 [upgrade]  VALID

PL/SQL procedure successfully completed.

SQL> SPOOL OFF

2. 开始升级数据库字典(大概需要30分钟)

SQL> STARTUP UPGRADE  
SQL> SPOOL patch.log    
SQL> @?/rdbms/admin/catupgrd.sql    
SQL> SPOOL OFF

编译无译对象

SQL> SHUTDOWN IMMEDIATE  
SQL> STARTUP    
SQL> @?/rdbms/admin/utlrp.sql

SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;

升级后检查,升级成功。

set line 200  
col ACTION_TIME for a30    
col ACTION for a20    
col NAMESPACE for a10    
col VERSION for a10    
col BUNDLE_SERIES for a5    
col COMMENTS for a25    
select * from dba_registry_history;

ACTION_TIME                    ACTION               NAMESPACE  VERSION            ID COMMENTS  
------------------------------ -------------------- ---------- ---------- ---------- -------------------------    
21-316 10.47.16.102814 VIEW RECOMPILE                                8289601 view recompilation

21-316 10.47.16.167852 UPGRADE              SERVER     10.2.0.5.0            Upgraded from 10.2.0.4.0

SQL>

四、打PSU19,更新OPatch版本,必须要更新OPatch版本

说明:分别在两个节点更新OPatch版本。

1. 更新OPatch版本,需要更新到10.2.0.5.19,OPatch直接压缩替换就可以了。

(1) 上传p6880880_102000_Linux-x86-64.zip到/u01/software目录下, /u01/software给777权限,也可以采用/tmp目录。  
(2) root用户下将原OPatch目录改名。

mv /u01/app/oracle/product/10.2.0/db_1/OPatch /u01/app/oracle/product/10.2.0/db_1/OPatchBK

2. oracle目录OPatch替换

(1) root用户

cd /u01/software/  
chown oracle:oinstall p6880880_102000_Linux-x86-64.zip    
chown oracle:oinstall p20299014_10205_Linux-x86-64.zip

(2) oracle用户

su - oracle  
cd /u01/software/    
unzip p6880880_102000_Linux-x86-64.zip    
unzip p20299014_10205_Linux-x86-64.zip

(3) root用户

cd /u01/software/  
mv OPatch /u01/app/oracle/product/10.2.0/db_1/

(4) oracle用户测试

su - oracle

/u01/app/oracle/product/10.2.0/db_1/OPatch/opatch version

Invoking OPatch 10.2.0.5.1  
OPatch Version: 10.2.0.5.1    
OPatch succeeded

3. 测试兼容性

su - oracle

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/20299014 -oh $ORACLE_HOME

----------------------------------------------------  
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1  
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

PREREQ session  
Oracle Home       : /u01/app/oracle/product/10.2.0/db_1    
Central Inventory : /u01/app/oracle/oraInventory    
   from           : /etc/oraInst.loc    
OPatch version    : 10.2.0.5.1    
OUI version       : 10.2.0.5.0    
OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui    
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2016-03-15_12-33-56PM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt  
Invoking prereq "checkconflictagainstohwithdetail"    
Prereq "checkConflictAgainstOHWithDetail" passed.    
OPatch succeeded.

五、实施打补丁PSU

1. 关闭数据库

1)关闭数据库  
sqlplus / as sysdba;    
shutdown immediate;

2)关闭监听

$ lsnrctl stop

3. oracle database打补丁,还是用同一个补丁包

su - oracle

/u01/app/oracle/product/10.2.0/db_1/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/20299014

***************************************************************  
Do you want to proceed? [y|n]    
y    
User Responded with: Y

Email address/User Name:

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    
...

Is the local system ready for patching? [y|n]  
y    
User Responded with: Y    
Verifying the update...    
Inventory check OK: Patch ID 20299014 is registered in Oracle Home inventory with proper meta-data.    
Files check OK: Files from Patch ID 20299014 are present in Oracle Home.    
Running make for target client_sharedlib    
Running make for target ikfod    
Running make for target ioracle    
Running make for target iwrap    
Running make for target client_sharedlib    
Running make for target proc    
Running make for target irman    
Running make for target itnslsnr    
Execution of ‘sh /u01/software/20299014/custom/scripts/post -apply 20299014 ‘:

Return Code = 0

The local system has been patched and can be restarted.

UtilSession: N-Apply done.

OPatch succeeded.  
过程略。    
***************************************************************

4. 查看升级状态

[[email protected] ~]$ /u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinv

Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1  
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/10.2.0/db_1    
Central Inventory : /u01/app/oracle/oraInventory    
   from           : /etc/oraInst.loc    
OPatch version    : 10.2.0.5.1    
OUI version       : 10.2.0.5.0    
OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui    
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2016-03-21_11-30-15AM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-03-21_11-30-15AM.txt

--------------------------------------------------------------------------------  
Installed Top-level Products (3):

Oracle Database 10g                                                  10.2.0.1.0  
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0    
Oracle Database 10g Release 2 Patch Set 4                            10.2.0.5.0    
There are 3 products installed in this Oracle Home.

Interim patches (1) :

Patch  20299014     : applied on Mon Mar 21 11:05:03 CST 2016  
Unique Patch ID:  19074368    
   Created on 24 Jun 2015, 02:35:37 hrs PST8PDT    
   Bugs fixed:    
     20074391, 13596521, 17088068, 8865718, 17201047, 13489660, 9020537    
     8664189, 10091698, 14275629, 19909862, 17832122, 17832123, 17832124    
     17832125, 16619894, 8822531, 10139235, 20299014, 8350262, 7119382    
     19274521, 13632738, 11724962, 20331945, 19274523, 9320130, 16961614    
     16961615, 13775862, 16961616, 16961617, 19006757, 16961618, 16961619    
     18221699, 9399589, 14841459, 9672816, 9499302, 20299021, 9659614, 13632743    
     9949948, 14220725, 8882576, 7612454, 7111619, 9711859, 9714832, 12780098    
     13561951, 14665116, 11066597, 16703112, 19231857, 17721717, 9713537    
     14459552, 19458377, 13737773, 13737775, 16212405, 18096714, 16338983    
     14390396, 10249537, 19006849, 7115910, 8354642, 7602341, 14076510    
     12565867, 15987029, 16462834, 18641419, 11693109, 14023636, 9024850    
     8394351, 8224558, 17082365, 14149782, 9109487, 14841558, 9171933    
     10173237, 16817117, 10068982, 10306945, 8666117, 11725006, 10214450    
     14205448, 17082371, 9767674, 16306019, 9323583, 9726739, 16279211    
     8412426, 10326338, 10165083, 6651220, 9145204, 13554409, 11076894    
     19854436, 11893577, 17865671, 16746190, 14492313, 14492314, 11814891    
     14492315, 14492316, 16742123, 21048089, 16864562, 14546638, 12419258    
     16056270, 10010310, 18139709, 9689310, 9390484, 21048090, 21048091    
     9963497, 12551700, 16362358, 12551701, 17465584, 12551702, 12551703    
     12551704, 10076669, 12551705, 16270946, 12551706, 12551707, 6076890    
     9308296, 12551708, 14258925, 12880299, 17381900, 18641451, 17381901    
     17381902, 11790175, 12796518, 9772888, 8650138, 17056813, 14469008    
     12551710, 10092858, 7519406, 9821321, 8771916, 13349665, 7509714    
     10159846, 13257247, 18031728, 18641461, 16372203, 11792865, 19007266    
     19309466, 16309604, 16309605, 16309606, 18522511, 8966823, 11674645    
     17551414, 15877957, 15877958, 7026523, 15877959, 17716305, 13503598    
     18767250, 9150282, 9448311, 10327179, 14774730, 19153980, 9735237    
     9952230, 15877960, 15877961, 15877962, 15877963, 8660422, 18221700    
     18221701, 16279401, 14546673, 14105702, 14105703, 14105704, 13483152    
     14269955, 17285560, 12925532, 12748240, 9694101, 12862186, 12862187    
     14727319, 8211733, 9586877, 9548269, 6694396, 7710224, 9337325, 11856395    
     10157402, 15950541, 19699191, 6402302, 10327190, 10269717, 13015379    
     10017048, 8546356, 13561750, 8821114, 9770451, 9360157, 8488233, 10132870    
     4180770, 9532911, 7361418, 6157713, 9184754, 8544696, 17850678, 8277300    
     13343467, 16382448, 13791364, 12419392, 10208905, 20236416, 20236417    
     20236418, 20236419, 7450366, 8970313, 6690853, 6011045, 10162036, 10248542    
     9469117, 13359623, 9952270, 13343471, 9842573, 17381899, 12710774    
     20558005, 10324526, 9322219, 8636407, 12828105, 19289642, 13736501    
     9824435, 13736502, 18681879, 13736503, 13736504, 13736505, 13736506    
     9032322, 13736507, 14035825, 19769505, 11858315, 14040433, 13916709    
     12827745, 14038805, 19567242, 16721594, 13923855, 19567243, 8528171    
     9072105, 19567244, 11737047

--------------------------------------------------------------------------------  
OPatch succeeded.

[[email protected] ~]$ $ORACLE_HOME/OPatch/opatch lsinv -bugs_fixed  |grep SPU  
17832122   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-058-SPUJAN2014    
17832123   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-059-SPUJAN2014    
17832124   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-060-SPUJAN2014    
17832125   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-061-SPUJAN2014    
17850678   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-062-SPUJAN2014    
18221699   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-063-SPUAPR2014    
18221700   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-064-SPUAPR2014    
18221701   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-065-SPUAPR2014    
18767250   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-066-SPUJUL2014    
19567242   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-067-SPUOCT2014    
19567243   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-068-SPUOCT2014    
19567244   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-069-SPUOCT2014    
20236416   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-070-SPUJAN2015    
20236417   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-071-SPUJAN2015    
20236418   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-072-SPUJAN2015    
20236419   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-073-SPUJAN2015    
21048089   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-074-SPUJUL2015    
21048090   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-075-SPUJUL2015    
21048091   20299014  Mon Mar 21 11:05:03 CST 2016   DB-10.2.0.5-MOLECULE-076-SPUJUL2015

5. 升级数据库字典

cd $ORACLE_HOME/rdbms/admin  
sqlplus /nolog    
SQL> CONNECT / AS SYSDBA    
SQL> STARTUP    
SQL> @catbundle.sql psu apply    
SQL> -- Execute the next statement only if this is the first PSU applied for 10.2.0.5 or this is the first PSU applied since 10.2.0.5.3.    
SQL> @utlrp.sql

升级后检查

SQL> set line 200  
SQL> col ACTION_TIME for a30    
SQL> col ACTION for a20    
SQL> col NAMESPACE for a10    
SQL> col VERSION for a20    
SQL> col BUNDLE_SERIES for a5    
SQL> col COMMENTS for a25    
SQL> select * from dba_registry_history;

ACTION_TIME                    ACTION               NAMESPACE  VERSION                      ID BUNDL COMMENTS  
------------------------------ -------------------- ---------- -------------------- ---------- ----- -------------------------    
21-316 10.47.16.102814 VIEW RECOMPILE                                          8289601       view recompilation

21-316 10.47.16.167852 UPGRADE              SERVER     10.2.0.5.0                            Upgraded from 10.2.0.4.0

21-316 11.09.17.948626 jvmpsu.sql           SERVER     10.2.0.5.2OJVMBP              0       RAN jvmpsu.sql

21-316 11.09.52.682715 jvmpsu.sql           SERVER     10.2.0.5.2OJVMBP              0       RAN jvmpsu.sql

21-316 11.15.00.366608 APPLY                SERVER     10.2.0.5                     19 PSU   PSU 10.2.0.5.19

5 rows selected.

SQL>

升级成功。

时间: 2024-11-03 01:23:45

Oracle 10g(10.2.0.4)升级到10.2.0.5.19的相关文章

CENTOS 6.4 安装oracle 10g,手工建库及升级到10.2.0.5

一. 数据库软件安装 参照官方手册 1.安装rpm包 注这里的yum直接用163的yum yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio li

oracle database 10.2.0.4 升级到 10.2.0.5

某发票开发测试库升级      升级前准备,此次升级只是很对测试环境数据库升级,所以没有事先一个月来获取系统,数据库的统计信息,机器性能比对 为了加快升级只是清理了以下信息 01.截断SYS.AUD$基表: SQL>TRUNCATE TABLE SYS.AUD$; 02.清理DBA回收站: SQL>purge DBA_RECYCLEBIN; 1.升级开始,升级前首先断开测试环境的中间件应用 查看本机的ORACLE_HOME [[email protected]_10 ~]$ echo $ORA

rac 10g 10.2.0.1升级到10.2.0.5具体解释

    RAC 10.2.0.1 升级到 10.2.0.5 一. 准备: Patch 包:p8202632_10205_LINUX.zip   节点数:3个节点       RAC1    RAC2   RAC3 当前节点状态 节点1: [[email protected] bin]# ./crs_stat -t Name          Type           Target    State    Host ---------------------------------------

rac 10g 10.2.0.1升级到10.2.0.5详解

    RAC 10.2.0.1 升级到 10.2.0.5 一. 准备: Patch 包:p8202632_10205_LINUX.zip   节点数:3个节点       RAC1    RAC2   RAC3 当前节点状态 节点1: [[email protected] bin]# ./crs_stat -t Name          Type           Target    State    Host ---------------------------------------

Redhat 5.4 Orcle RAC 数据库 从10.2.0.1升级到 10.2.0.4

之前安装的是两个节点的RAC 平台. 数据库版本是10.2.0.1. 这个实验的目的就是将这个数据库版本从10.2.0.1 升级到 10.2.0.4.  升级包可以从Oracle metalink上进行下载,这个下载需要Oracle 付费的帐号. 网络可能也有资源下载. 10.2.0.4的patch number 是:p6810189. 两个节点的RAC 安装,参考Blog: Redhat 5.4 + ASM + RAW+ Oracle 10g RAC 安装文档 http://blog.csdn

探索Oracle之数据库升级二 11.2.0.3升级到11.2.0.4完整步骤

探索Oracle之数据库升级二  11.2.0.3升级到11.2.0.4完整步骤 说明:         这篇文章主要是记录下单实例环境下Oracle 11.2.0.1升级到11.2.0.3的过程,当然RAC的升级是会有所不同.但是他们每个版本之间升级步骤都是差不多的,先升级Database Software,再升级Oracle Instance. Oracle 11.2.0.4的Patchset No:19852360下载需要有Oracle Support才可以.  Patchset包含有7个

ORACLE 11.2.0.1升级到11.2.0.3

ORACLE 11.2.0.1升级到11.2.0.3 最近听了李光老师的关于oracle的升级公开课,深有感悟,之前一直想自己测试的,没有下定决心,这几天自己在虚拟机上测试了一下,测试的过程如下,当然这个只是一些基本的步骤,实际的生产环境我想比这个复杂的多了,但是不用急,慢慢来,循序渐进吧... 1. 数据库情况 单实例非ASM存储 ORACLE_SID : orcl ORACLE_HOME: /u01/app/oracle/product/11.2.0/dbhome_1 1. 数据库原始状态

Oracle11.2.0.1升级到11.2.0.3

Oracle数据库升级也并非简单的事,这篇博客,博主对Oracle那点事做了较详细的介绍: http://blog.itpub.net/9599/viewspace-473003/ 我还属于Oracle的菜鸟,就不献丑介绍了. 下面我就简单总结下,Oracle同版本升级的经历: 升级数据库: 1. 先检查数据库当前版本: SELECT * FROM v$version; 2. 使用RMAN或exp 进行全库备份 [这一步非常非常重要,因升级到数据部分时,虚拟机没空间了,导致VM崩溃,升级失败.o

11.2.0.3升级到11.2.0.4报错ORA-01157 ORA-01110

昨天晚上生产库要做升级,从11.2.0.3升级到11.2.0.4,但是遇到了ORA-01157 ORA-01110报错,数据库无法startup upgrade. 环境:HP-UX B.11.31+11.2.0.3+祼设备,数据库大小近8T 由于之前做过一次,也有现成的文档算是轻车熟路了,11.2.0.4软件和补丁已经提前打好,停完业务之前就开始做升级. 刚开始做检查都比较顺利,一直到RMAN备份完成.由于数据库数据量太大,采用把所有业务表空间置为read only状态,只备份系统相关表空间(S