oracle 10.2.0.4.1升级到10.2.0.5.6

一、32位的主机居然找不到高版本可以tar的软件,所以只能手工打patch升级!

1,  开始升级,查看oracle数据库情况

cnsh230002:hdinvdl > echo $ORACLE_HOME

/wls/paic/hq/app102041/oracle/product/10.2.0

关闭数据库,关闭监听

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

 

cnsh230002:hdinvdl > lsnrctl stop hdinvdl

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 12-MAY-2013 19:27:28

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

Connecting to (DESCRIPTION=(address=(protocol=TCP)(HOST=10.31.203.16)(PORT=1536)))

The command completed successfully

2,  下载p8202632_10205_LINUX.zip包,并解压

cnsh230002:hdinvdl2 >unzip

cnsh230002:hdinvdl2 > ls -l p8202632_10205_LINUX.zip

total 1088708

drwxr-xr-x    5 oracle   dba          4096 Dec 21  2011 13343471

drwxr-xr-x    5 oracle   dba          4096 Jul 23  2010 Disk1

-rwxrwxrwx    1 padba    usr03     9557216 May 12 14:54 p13343471_10205_LINUX.zip

-rwxrwxrwx    1 padba    usr03    1103992900 May 12 15:50 p8202632_10205_LINUX.zip

-rwxrwxrwx    1 oracle   dba        165290 Jul 20  2010 README.html

3,因为无图像解决设置DISPLAY参数

DISPLAY=10.11.108.41:5.0

cnsh230002:hdinvdl2 >export DISPLAY

4,  运行升级程序

cnsh230002:hdinvdl2 >cd Disk1

cnsh230002:hdinvdl2 >./ runInstaller

5,  出现图像安装界面

省略安装步骤。。。。

6,  执行root脚本

[root@cnsh230002 oraInventory]# ./orainstRoot.sh
Changing permissions of /wls/paic/hq/app102041/oraInventory to 770.
Changing groupname of /wls/paic/hq/app102041/oraInventory to dba.
The execution of the script is complete
[root@cnsh230002 10.2.0]# ./root.sh
Running Oracle 10g root.sh script...

 

7,  升级数据字典

SQL> STARTUP UPGRADE

ORACLE instance started.

 

Total System Global Area 2097152000 bytes

Fixed Size                  1274644 bytes

Variable Size            1224740076 bytes

Database Buffers          855638016 bytes

Redo Buffers               15499264 bytes

Database mounted.

SQL> select status from v$instance;

 

STATUS

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

OPEN MIGRATE

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

…..省略执行过程

最终结果如下。。。。。

Database opened.Oracle Database 10.2 Upgrade Status Utility           05-12-2013 19:04:21

.

Component                                Status         Version  HH:MM:SS

Oracle Database Server                    VALID      10.2.0.5.0  00:08:09

JServer JAVA Virtual Machine              VALID      10.2.0.5.0  00:02:10

Oracle XDK                                VALID      10.2.0.5.0  00:00:32

Oracle Database Java Packages             VALID      10.2.0.5.0  00:00:13

Oracle Workspace Manager                  VALID      10.2.0.5.0  00:00:42

Oracle Expression Filter                  VALID      10.2.0.5.0  00:00:08

.

Total Upgrade Time: 00:13:24

 

PL/SQL procedure successfully completed.

 

DOC>#######################################################################

DOC>#######################################################################

DOC>

DOC>   The above PL/SQL lists the SERVER components in the upgraded

DOC>   database, along with their current version and status.

DOC>

DOC>   Please review the status and version columns and look for

DOC>   any errors in the spool log file.  If there are errors in the spool

DOC>   file, or any components are not VALID or not the current version,

DOC>   consult the Oracle Database Upgrade Guide for troubleshooting

DOC>   recommendations.

DOC>

DOC>   Next shutdown immediate, restart for normal operation, and then

DOC>   run utlrp.sql to recompile any invalid application objects.

DOC>

DOC>#######################################################################

DOC>#######################################################################

关闭数据库重启,即可

cnsh230002:hdinvdl > sqlplus '/as sysdba'

 

SQL*Plus: Release 10.2.0.5.0 - Production on Sun May 12 19:28:26 2013

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected to an idle instance.

 

SQL> STARTUP

ORACLE instance started.

 

Total System Global Area 2097152000 bytes

Fixed Size                  1274644 bytes

Variable Size            1224740076 bytes

Database Buffers          855638016 bytes

Redo Buffers               15499264 bytes

Database mounted.

Database opened.

到此升级成功。。。。

 

二、应用psu

升级opatch软件

cnsh230002:hdinvdl > ./opatch apply

Invoking OPatch 10.2.0.4.9

Oracle Interim Patch Installer version 10.2.0.4.9

Copyright (c) 2009, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/ora10g/product/database

Central Inventory : /opt/ora10g/oraInventory

   from           : /etc/oraInst.loc

OPatch version    : 10.2.0.4.9

OUI version       : 10.2.0.5.0

 

Opatch版本太低无法应用apply

下载p6880880Opatch,并覆盖原来的Opatch

 

应用opatch apply

cnsh230002:hdinvdl > ./opatch apply

….直到应用patch成功

ApplySession adding interim patch '13343471' to inventory

 

Verifying the update...

Inventory check OK: Patch ID 13343471 is registered in Oracle Home inventory with proper meta-data.

Files check OK: Files from Patch ID 13343471 are present in Oracle Home.

 

The local system has been patched and can be restarted.

 

 

OPatch succeeded.

 

关闭数据库,停止监听

查询文件extjob的权限,必须为-rwsr-x---   1 root     dba

否则用root授权

chmod 4750 $ORACLE_HOME/bin/extjob

cnsh230002:hdinvdl > ls -tlr  $ORACLE_HOME/bin/extjob

-rwsr-x---    1 root     dba        877094 May 12 18:36 /wls/paic/hq/app102041/oracle/product/10.2.0/bin/extjob

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP

SQL> @catbundle.sql psu apply

SQL> QUIT

 

查看数据库psu是否使用

SQL> select ACTION, VERSION,ID, COMMENTs  from DBA_REGISTRY_HISTORY;

 

ACTION               VERSION                                ID COMMENTS

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

VIEW RECOMPILE                                         8289601 view recompilation

UPGRADE              10.2.0.5.0                                Upgraded from 10.2.0.4.0

APPLY                10.2.0.5                                1 PSU 10.2.0.4.1

APPLY                10.2.0.5                                6 PSU 10.2.0.5.6

 

到此升级完成。。。。。。

你可能感兴趣的:(oracle 10.2.0.4.1升级到10.2.0.5.6)