ITPub博客

首页 > 数据库 > Oracle > 11.2.0.1.7 手动升级 11.2.0.3.12

11.2.0.1.7 手动升级 11.2.0.3.12

原创 Oracle 作者:parknkjun 时间:2015-04-03 16:01:19 0 删除 编辑
1、查询当前grid infrastructure与rdbms OPatch版本(两节点执行)
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
[grid@jzh1 ~]$ su - oracle
Password: 
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 11.2.0.1.7
OPatch Version: 11.2.0.1.7
OPatch succeeded.
2、备份安装目录 (两节点执行)
[root@jzh1 /]# tar -cvf u01.tar u01/
3、备份OPatch目录(grid,oracle安装目录,两节点执行)
[root@jzh1 db_1]# tar -xcf OPatch.tar OPatch/ 
[root@jzh1 db_1]# cd /u01/app/oracle/product/11.2.0/db_1/
[root@jzh1 db_1]# tar -xcf OPatch.tar OPatch/ 
4、以grid与oracle用户解压(两节点执行)
[grid@jzh1 patch]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@jzh1 patch]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
5、查询OPatch版本(两节点执行)
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
[grid@jzh1 ~]$ su - oracle
Password: 
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.6
6、补本冲突检查(两节点执行)
grid与oracle用户执行
[grid@jzh1 patch]$ unzip p19440385_112030_Linux-x86-64.zip
[grid@jzh1 patch]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /software/patch/19121548 -oh $ORACLE_HOME
[grid@jzh1 patch]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /software/patch/17592127 -oh $ORACLE_HOME 
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /software/patch/19121548 -oh $ORACLE_HOME
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /software/patch/17592127 -oh $ORACLE_HOME
7、停止应用补本节点DB(oracle用户执行)
[oracle@jzh1 ~]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/state_file.txt  -n jzh1
[oracle@jzh2 ~]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/state_file.txt  -n jzh2
8、停止CRS集群(root用户两节点执行)
[root@jzh1 install]# ./rootcrs.pl -unlock
9、应用crs补丁(两节点grid用户执行)
[grid@jzh1 patch]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /software/patch/17592127/
[grid@jzh1 patch]$ $ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /software/patch/19121548/
10、应用DB补丁前执行脚本(oracle用户两节点执行)
[oracle@jzh1 ~]$ /software/patch/17592127/custom/server/17592127/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
11、应用DB补丁(oracle用户两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /software/patch/17592127/custom/server/17592127/
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /software/patch/19121548/
12、应用DB补丁后执行脚本(oracle用户两节点执行)
[oracle@jzh1 ~]$ /software/patch/17592127/custom/server/17592127/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
13、使用root用户执行脚本(两节点执行)
[root@jzh1 ~]# /u01/app/11.2.0/grid/product/11.2.0/db_1/rdbms/install/rootadd_rdbms.sh 
14、使用root用户执行脚本启动crs(两节点执行)
[root@jzh1 ~]# /u01/app/11.2.0/grid/product/11.2.0/db_1/crs/install/rootcrs.pl -patch
15、开启应用补丁节点DB
[oracle@jzh1 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/state_file.txt  -n jzh1
[oracle@jzh2 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/state_file.txt  -n jzh2
16、执行脚本更新DB补丁记录(sysdba用户登陆数据库)
[oracle@jzh1 ~]$ cd $ORACLE_HOME/rdbms/admin
SQL> @catbundle.sql psu apply
17、检查补丁状态
查询DB补丁记录
SQL> col action_time for a30      
SQL> col version for a15
SQL> col id for 99
SQL> col action for a10
SQL> col namespace for a10
SQL> col COMMENTS for a20
SQL> col BUNDLE_SERIES for a15
SQL> select * from registry$history;
18、查询补丁状态grid用户执行(两节点执行)
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
[grid@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
19、查询补丁状态oracle用户执行(两节点执行)
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
[oracle@jzh1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory



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

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

注册时间:2008-02-11

  • 博文量
    115
  • 访问量
    518958