Chinaunix首页 | 论坛 | 博客
  • 博客访问: 13598
  • 博文数量: 1
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 20
  • 用 户 组: 普通用户
  • 注册时间: 2017-01-16 11:01
文章分类

全部博文(1)

文章存档

2017年(1)

我的朋友

分类: Oracle

2017-10-24 18:03:03


SQL> set pages 100 lines 120  
SQL> col action format a6  
SQL> col namespace format a10  
SQL> col version format a10  
SQL> col comments format a15  
SQL> col action_time format a30  
SQL> col bundle_series format a15  
SQL> alter session set nls_timestamp_format = 'yyyy-mm-dd hh24:mi:ss.ff';  
Session altered.  
SQL> select * from dba_registry_history;  

--关闭数据库

.重启后集群自启数据库
[root@rac2 ~]# srvctl enable database -d doudou
You have mail in /var/spool/mail/root
[root@rac2 ~]# srvctl config database -d doudou -a
crsctl stop has =>双节点执行
crsctl start has =>双节点执行 
crsctl stat res -t =>查看数据库状态

查看最新的PSU
756671.1


1454618.1


下载最新的PSU    OPatch   然后先打Opatch  

然后根据下载解压的zip 文件,找到
如下的对应关系


24732075  DB PSU 11.2.0.4.170418 (INCLUDES CPUAPR2017)

Both DB Homes and Grid Home  23054319

OCW PSU 11.2.0.4.160719  Both DB Homes and Grid Home   22502505

查看red里面的这个目录    Section 5, "Manual Steps for Apply/Rollback Patch"


5 Manual Steps for Apply/Rollback Patch


See My Oracle Support Document 1641136.1 for cases where opatch auto cannot be used.

去官方metlink    1641136.1

找到他   Manual Steps for Apply/Rollback Patch   然后开始如下升级


Table 3 Patch Numbers Getting Installed as Part of this GI PSU Patch


   Patch Number Description Applicable Homes   26609445

DB PSU 11.2.0.4.170814 (INCLUDES CPUJUL2017) Both DB Homes and Grid Home   26609929

OCW PSU 11.2.0.4.170814  Both DB Homes and Grid Home 22502505

ACFS PSU 11.2.0.4.160419  Only Grid Home

备份oracle软件和crs软件
cd /u01/backup 
tar -cvf oracle20160308.tar /u01/app/oracle/product/11.2.0/db_1/* 
tar -cvf grid20160308.tar /u01/app/11.2.0/grid/* 
tar -cvf oracle20160308.tar /u01/app/oraInventory/* 

 把Opatch解压到$GRID_HOME
 unzip p6880880_112000_Linux-x86-64.zip -d $GRID_HOME/
 
 修改$GRID_HOME/OPatch的属组:
 chown -R grid:oinstall $GRID_HOME/OPatch
 
 把patch文件解压到/tmp目录下:
 unzip p20996923_112040_Linux-x86-64.zip -d /tmp
 
 修改/tmp/20996923的属组:
 chown -R grid:oinstall /tmp/20996923


查询opatch的版本: 
node2-> pwd
$GRID_HOME/OPatch
node2-> ./opatch version
OPatch Version: 11.2.0.3.10


查询node2是否打了patch:
su - grid
node2-> pwd
$GRID_HOME/OPatch
node2-> ./opatch lspatches 
There are no Interim patches installed in this Oracle Home "$GRID_HOME".


OPatch succeeded.


 用root用户执行:
 
 $GRID_HOME/crs/install/rootcrs.pl -unlock


 如果在AIX上,需要用root用户执行slibclean命令:
 su - root;  slibclean
 
 su - grid 
 
 $GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /tmp/25476126/23054319  --这个需要读解压的补丁包 
 
 $GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /tmp/25476126/22502505
 
 $GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /tmp/25476126/24732075
 
 su - oracle
 
 /tmp/25476126/23054319/custom/server/23054319/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
 
 su - root
 
  把Opatch解压到$ORACLE_HOME
  
  unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME/
  
  修改$ORACLE_HOME/OPatch的属组:
   
  chown -R oracle:oinstall $ORACLE_HOME/OPatch
  
  su - oracle
 
 $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tmp/25476126/23054319/custom/server/23054319
 
 $ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tmp/25476126/24732075
 
 /tmp/25476126/23054319/custom/server/23054319/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME
 
 su - root
 
 $GRID_HOME/rdbms/install/rootadd_rdbms.sh
 
 $GRID_HOME/crs/install/rootcrs.pl -patch
 
 以上的操作在node1上再执行一遍。 各个节点都执行如上步骤
 
 在一个实例是上行下面的操作:
 
 cd $ORACLE_HOME/rdbms/admin
 sqlplus /nolog
 SQL> CONNECT / AS SYSDBA
 SQL> STARTUP
 SQL> @catbundle.sql psu apply
 SQL> QUIT
 
 cd $ORACLE_HOME/rdbms/admin
 sqlplus /nolog
 SQL> CONNECT / AS SYSDBA
 SQL> @utlrp.sql
 
阅读(2885) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~