10g資料庫從10.2.0.4升級到10.2.0.5

super_sky發表於2014-02-22
下面是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_.zip
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./13923855


unzip p13923855_10205_.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__APPLY_.log
catbundle_PSU__GENERATE_.log


檢查隱含引數
_external_scn_rejection_threshold_hours

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-1086257/,如需轉載,請註明出處,否則將追究法律責任。

相關文章