2. 断开主库和备库的传输
3.停止主库listener和db
4.停止备库listener和db
5. 确认OPatch的版本是否正确
OPatch Utility Information
You must use the OPatch utility version 11.1.0.6.2 or later. Oracle recommends that you use the latest released OPatch 11.1, which is available for download from My Oracle Support patch 6880880 by selecting the 11.1.0.0.0 release.
For information about OPatch documentation, including any known issues, see My Oracle Support Note 293369.1 OPatch documentation list.
6.确保PATH变量设置正确
有可能遇到crti.o不存在的错误,其实是存在的,设置下变量
find / -name crti.o
/usr/lib64/crti.o
/usr/lib/x86_64-redhat-linux5E/lib64/crti.o
LIBRARY_PATH=/usr/lib/x86_64-redhat-linux5E:$LIBRARY_PATH
export LIBRARY_PATH
7.在主库解压补丁
unzip p8290402_111060_<platform>.zip
cd 8290402 opatch napply -skip_subset -skip_duplicate
8. 在非RAC环境下操作
-
For each database instance running on the Oracle home being patched:
-
Connect to the database using SQL*Plus. Connect as SYSDBA and run the
catbundle.sql
script as follows:cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> @catbundle.sql cpu apply SQL> QUIT
For information about the
catbundle.sql
script, see My Oracle Support Note 605795.1 Introduction to Oracle Database catbundle.sql. -
If you are not applying CPUApr2009 on top of a previous CPU, enter the following statements after running the
catbundle.sql
script. (If you are applying CPUApr2009 on top of a previous CPU, you do not need to enter the following statements.)cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> @utlrp.sql
-
-
Check the following log files in
$ORACLE_HOME/cfgtoollogs/catbundle
any errors:catbundle_CPU_<database SID>_APPLY_<TIMESTAMP>.log catbundle_CPU_<database sid>_GENERATE_<TIMESTAMP>.log
where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 4, "Known Issues".
Recompiling Views in the Database
You may skip this section if you have recompiled views for this database during the installation of a previous CPU or if the database was created with release 11.1.0.6 or later.
The time required to recompile the views and related objects depends on the total number of objects and on your system configuration. In one internal Oracle test with approximately 2000 views and 4000 objects, the total execution time for view_recompile_jan2008cpu.sql
and utlrp.sql
was about 30 minutes.
Note: Depending on these considerations and your downtime schedule, you can choose to schedule the recompilation of views independent of the rest of the CPU installation. If you do this, your system will continue to work; however, the CPU installation will not be complete until the view recompilation is completed. |
If you want to check whether view recompilation has already been performed for the database, execute the following statement.
SELECT * FROM registry$history where ID = '6452863';
If the view recompilation has been performed, this statement returns one or more rows. If the view recompilation has not been performed, this statement returns no rows.
-
If any invalid objects were reported, run the
utlrp.sql
script as follows:cd $ORACLE_HOME/rdbms/admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> @utlrp.sql
Then, manually recompile any invalid objects. For example:
SQL> alter package schemaname.packagename compile;
RAC的参照patch中readme就可以了
9. 启动主库的listener
10. 在备库进行软件的opatch
在备库解压补丁 unzip p8290402_111060_<platform>.zip
cd 8290402 opatch napply -skip_subset -skip_duplicate11.启动备库listener
12.启动备库的db
13.将主备库的同步关系建立
alter system set LOG_ARCHIVE_DEST_STATE_2=enable scope=both;
14.检查主备库的同步以及补丁是否应用
select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#;
在primary, standby分别运行opatch lsinventory
在数据库里检查补丁是否安装成功
SELECT * FROM registry$history where ID = '6452863';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22039464/viewspace-1754292/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22039464/viewspace-1754292/