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 recompilation21-316 10.47.16.167852 UPGRADE SERVER 10.2.0.5.0 Upgraded from 10.2.0.4.0 SQL>
su - oracle$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/20299014 -oh $ORACLE_HOME---------------------------------------------------- Invoking OPatch 10.2.0.5.1Oracle 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.logPatch 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: YEmail 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 = 0The local system has been patched and can be restarted.UtilSession: N-Apply done.OPatch succeeded. 过程略。 ***************************************************************
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 recompilation21-316 10.47.16.167852 UPGRADE SERVER 10.2.0.5.0 Upgraded from 10.2.0.4.021-316 11.09.17.948626 jvmpsu.sql SERVER 10.2.0.5.2OJVMBP 0 RAN jvmpsu.sql21-316 11.09.52.682715 jvmpsu.sql SERVER 10.2.0.5.2OJVMBP 0 RAN jvmpsu.sql21-316 11.15.00.366608 APPLY SERVER 10.2.0.5 19 PSU PSU 10.2.0.5.195 rows selected.SQL>升级成功。更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址