下面是10g数据库从10.2.0.4 升级到10.2.0.5 然后打patch 13923855的步骤。
一、将数据库版本从10.2.0.4 升级到 10.2.0.5
升级前检查
conn / as sysdba
set lines 200 pages 999
spool /tmp/invald_sdh.log
col owner for a15
SELECT version FROM v$timezone_file; ----小于4或大于4,查看 1086400.1
select owner,count(1) from dba_objects where status='INVALID' group by owner order by 2 desc,1;
col comp_name for a35
select comp_name,version,status from dba_registry;
select * from UTL_RECOMP_ERRORS;
show parameter job_queue_processes;
alter system set job_queue_processes=0 scope=both;
show parameter job_queue_processes
spool
关闭监听以及数据库
lsnrctl stop
sqlplus / as sysdba
shutdown immeidate
备份ORACLE_HOME目录
配置rsp文件
UNIX_GROUP_NAME="oinstall"
FROM_LOCATION="/home/oracle/Disk1/stage/products.xml"
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
ORACLE_HOME_NAME="OraDbHome1"
MYORACLESUPPORT_USERNAME=""
MYORACLESUPPORT_PASSWORD=""
DECLINE_SECURITY_UPDATES=true
升级软件
$ ./runInstaller -silent -responseFile /backup/setup/Disk1/init.rsp
升级数据字典
SQL> STARTUP UPGRADE
SQL> SPOOL upgrade_info.log
SQL> @?/rdbms/admin/utlu102i.sql
SQL> SPOOL OFF
$ lsnrctl start
$ sqlplus /nolog
SQL> CONNECT SYS AS SYSDBA
Enter password:SYS_password
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 lines 200 pages 999
col comp_name for a35
col version for a30
select comp_name,version,status from dba_registry;
select * from UTL_RECOMP_ERRORS;
show parameter job_queue_processes
alter system set job_queue_processes=10 scope=both;
show parameter job_queue_processes
spool off
二、打PSU8(patch 13923855)
opatch升级
1)配置opatch路径到path环境变量
2)检查opatch是否可用以及opatch的版本
$ opatch lsinventory
由于13923855补丁程序要求OPatch 10.2 version 10.2.0.5.0 or later to apply this patch。
因此需要使用opatch补丁6880880。
2)升级optch
参考 OPatch - Where Can I Find the Latest Version of OPatch? [Video] [ID 224346.1]
echo $ORACLE_HOME
解压p6880880_102000_Linux-x86-64.zip
备份opatch目录
mv $ORACLE_HOME/Opatch $ORACLE_HOME/OPatchbak
mv OPatch $ORACLE_HOME
3)验证版本
opatch version
patch 13923855 安装
unzip p13923855_10205_<platform>.zip
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13923855
unzip p13923855_10205_<platform>.zip
cd 13923855
opatch apply
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> QUIT
catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
检查隐含参数
_external_scn_rejection_threshold_hours
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21980353/viewspace-1873216/
,如需转载,请注明出处,否则将追究法律责任。