Oracle DG/ADG上CPU/PSU补丁安装

1. 保证DG或者ADG的环境是正常的

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环境下操作
	
  1. For each database instance running on the Oracle home being patched:

    1. 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.

    2. 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
      
  2. 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.

  1. 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_duplicate
 11.启动备库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/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值