Oracle从10.2.0.4升级到10.2.0.5
1. 确定环境是否正确
# echo $ORACLE_HOME
/oracle/app/oracle/product/10.2.0/db_1
# echo $ORACLE_SID
orcl
如果ORACLE_SID没设置需要export
#export ORACLE_SID=orcl
2. 关闭所有oracle 的服务
$ emctl stop dbconsole
$isqlplusctl stop
关闭Oracle SQL>SHUTDOWN IMMEDIATE;
停止监听lsnrctl stop
3.解压缩补丁包
4.升级
[oracle@LING Disk1]$su -root
[root@LING Desktop]# xhost +
access control disabled, clients can connect from any host
[root@LING Desktop]# su - oracle
[oracle@LING Disk1]$ ls
10204_buglist.htm install patch_note.htm response runInstaller stage
[oracle@LING Disk1]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, SuSE-10, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1, asianux-2 or asianux-3
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-04-29_02-58-42AM. Please wait ...[oracle@LING Disk1]$ Oracle Universal Installer, Version 10.2.0.4.0 Production
Copyright (C) 1999, 2008, Oracle. All rights reserved.
Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
"I wish to receive security updates via My Oracle Support" 前面那个勾可以去掉。
出现错误:
Checking operating system package requirements ...
Check complete. The overall result of this check is: Not executed <<<<
OUI-11108: Packages information not specified.
Recommendation: Install the required packages before continuing with the installation.
=======================================================================
目前还在查找解决方法.......
实在找不到解决方法,因为是测试所以我暂时跳过那个错了。
用root 用户运行脚本:/u01/app/oracle/product/10.2.0/db_1/root.sh。 运行结束后升级操作结束。 整个过程十几分钟搞定。
这次试一下用dbua升级:
[oracle@LING Disk1]$dbua
在这里停留了很久很久.......
一边测试,一边做其他工作,结果忽略了后面的提示。难怪等了好久......
倒数第二步EM配置出错。 这里先继续。EM 可以最后在单独配置,如果不需要EM,不重新配置都可以。
更新结束。
检查实例版本信息
[oracle@QL-LINUX ~]$ export ORACLE_SID=orcl
[oracle@QL-LINUX ~]$ echo $ORACLE_SID
orcl
[oracle@QL-LINUX ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Oct 24 15:27:34 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> connect sys/welcome1 as sysdba;
Connected.
用DBUA更新后,实例自动启动。
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
SQL> select comp_id,version,status from dba_registry;
COMP_ID VERSION STATUS
------------------------------ ------------------------------ -----------
EM 10.2.0.5.0 VALID
SDO 10.2.0.5.0 VALID
ORDIM 10.2.0.5.0 VALID
AMD 10.2.0.5.0 VALID
XDB 10.2.0.5.0 VALID
CONTEXT 10.2.0.5.0 VALID
EXF 10.2.0.5.0 VALID
RUL 10.2.0.5.0 VALID
OWM 10.2.0.5.0 VALID
ODM 10.2.0.5.0 VALID
CATALOG 10.2.0.5.0 VALID
COMP_ID VERSION STATUS
------------------------------ ------------------------------ -----------
CATPROC 10.2.0.5.0 VALID
JAVAVM 10.2.0.5.0 VALID
XML 10.2.0.5.0 VALID
CATJAVA 10.2.0.5.0 VALID
APS 10.2.0.5.0 VALID
XOQ 10.2.0.5.0 VALID
17 rows selected.
SQL> select * from dba_registry_history;
ACTION_TIME
---------------------------------------------------------------------------
ACTION NAMESPACE
------------------------------ ------------------------------
VERSION ID
------------------------------ ----------
COMMENTS
--------------------------------------------------------------------------------
19-OCT-12 02.25.54.698296 PM
UPGRADE SERVER
10.2.0.4.0
Upgraded from 10.2.0.1.0
ACTION_TIME
---------------------------------------------------------------------------
ACTION NAMESPACE
------------------------------ ------------------------------
VERSION ID
------------------------------ ----------
COMMENTS
--------------------------------------------------------------------------------
19-OCT-12 04.43.27.749053 PM
APPLY SERVER
10.2.0.4 4
PSU 10.2.0.4.4
ACTION_TIME
---------------------------------------------------------------------------
ACTION NAMESPACE
------------------------------ ------------------------------
VERSION ID
------------------------------ ----------
COMMENTS
--------------------------------------------------------------------------------
22-OCT-12 09.27.39.507720 AM
APPLY SERVER
10.2.0.4 4
PSU 10.2.0.4.4
ACTION_TIME
---------------------------------------------------------------------------
ACTION NAMESPACE
------------------------------ ------------------------------
VERSION ID
------------------------------ ----------
COMMENTS
--------------------------------------------------------------------------------
24-OCT-12 11.11.09.820774 AM
VIEW RECOMPILE
8289601
view recompilation
ACTION_TIME
---------------------------------------------------------------------------
ACTION NAMESPACE
------------------------------ ------------------------------
VERSION ID
------------------------------ ----------
COMMENTS
--------------------------------------------------------------------------------
24-OCT-12 11.11.09.904126 AM
UPGRADE SERVER
10.2.0.5.0
Upgraded from 10.2.0.4.0
/----------------------------------------------------------------------------------------------------------------------/
下一步再去找10.2.0.5.4,的升级包。
小结一下:
1. OUI-11108: Packages information not specified. 这个错误是指系统环境有问题,不过我实在找不到解决方法,最后数据库更新到成功了。
2. 个人觉得DBUA 比较好用,还是喜欢有图形界面,比较友好。
3. 更新时有个小问题:之前我替换过OPatch 文件夹(/u01/app/oracle/product/10.2.0/client_1/OPatch/)
OPatch Version: 10.2.0.4.2 改到 Invoking OPatch 10.2.0.5.1
这个OPatch是我自己更新的,DBUA升级时提示找不到OPatch,然后我还原文件(还好我更新前做了文件的备份)后重新更新就通过了。
——更新到10.2.0.5后,OPatch Version: 10.2.0.4.9 (这个版本还是有点低)
[oracle@QL-LINUX ~]$ /u01/app/oracle/product/10.2.0/client_1/OPatch/opatch version
Invoking OPatch 10.2.0.4.9
OPatch Version: 10.2.0.4.9
OPatch succeeded.
我决定还是用新版的替换掉,原来的OPatch做个备份(OPatch_Backup):
[oracle@QL-LINUX ~]$ /u01/app/oracle/product/10.2.0/client_1/OPatch/opatch version
Invoking OPatch 10.2.0.5.1
OPatch Version: 10.2.0.5.1
OPatch succeeded.