ITPub博客

首页 > 数据库 > Oracle > 回退11.2.0.3.12 PSU补丁

回退11.2.0.3.12 PSU补丁

原创 Oracle 作者:parknkjun 时间:2015-04-04 16:02:44 0 删除 编辑
1、停止节点DB(oracle用户两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/bin/srvctl stop home -o $ORACLE_HOME -s /home/oracle/state_file_rollback.txt -n jzh1
[oracle@jzh2 ~]$ $ORACLE_HOME/bin/srvctl stop home -o $ORACLE_HOME -s /home/oracle/state_file_rollback.txt -n jzh2
2、停止crs集群(root用户执行,两节点执行)
[root@jzh1 db_1]# /u01/app/11.2.0/grid/product/11.2.0/db_1/crs/install/rootcrs.pl -unlock
3、检查oracle进程
[root@jzh1 db_1]# ps -ef | grep ora
root      2871  2830  0 13:53 ?        00:00:05 hald-addon-storage: polling /dev/sr0
root      5792  5234  0 15:01 pts/1    00:00:00 grep ora
4、回退crs补丁(grid用户执行,两节点执行)
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 17592127 -oh $ORACLE_HOME
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 19121548 -oh $ORACLE_HOME
5、DB补丁回退前执行脚本(oracle用户执行,两节点执行)
[oracle@jzh1 ~]$ /software/patch/17592127/custom/server/17592127/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
6、回退DB补丁(oracle用户执行,两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 17592127 -oh $ORACLE_HOME
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 19121548 -oh $ORACLE_HOME
7、回退DB补丁后执行脚本(oracle用户执行,两节点执行)
[oracle@jzh1 ~]$ /software/patch/17592127/custom/server/17592127/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
8、root用户执行脚本(两节点执行)
[root@jzh1 ~]# /u01/app/11.2.0/grid/product/11.2.0/db_1/rdbms/install/rootadd_rdbms.sh
9、root用户执行启动员crs脚本
[root@jzh1 ~]# /u01/app/11.2.0/grid/product/11.2.0/db_1/crs/install/rootcrs.pl -patch
Using configuration parameter file: /u01/app/11.2.0/grid/product/11.2.0/db_1/crs/install/crsconfig_params
CRS-4123: Oracle High Availability Services has been started.
注:如出现信息 "A system reboot is recommended before using ACFS”,需要重启。
10、开启节点DB(使用oracle用户执行,两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/state_file_rollback.txt -n jzh1
[oracle@jzh2 ~]$ $ORACLE_HOME/bin/srvctl start home -o $ORACLE_HOME -s /home/oracle/state_file_rollback.txt -n jzh2
11、执行回退脚本catbundle.sql(sysdba用户登陆)
[oracle@jzh1 ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@jzh1 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 1 16:20:32 2015
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> @catbundle_PSU_JZH_ROLLBACK.sql
12、将OPatch.bak tar 回来(grid,oracle用户下,两节点执行)
[root@jzh1 db_1]# tar -xvf OPatch OPatch.bak
13、查询回退状态
SQL> select * from registry$history;
13、查询补丁状态grid用户执行(两节点执行)
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
There are no Interim patches installed in this Oracle Home.
14、查询补丁状态oracle用户执行(两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
There are no Interim patches installed in this Oracle Home.




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10271187/viewspace-1486663/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
DBA攻城狮

注册时间:2008-02-11

  • 博文量
    115
  • 访问量
    519566