首页 > 其他分享 >Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

时间:2022-11-15 20:23:17浏览次数:44  
标签:homes RAC dbhome app manual opatch patch oracle u01

Patch 22191577: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.160119 (JAN2016)

Unzip the patch 22191577
Unzip latest Opatch Version in oracle home and crs home

Once this completed successfully make sure OPatch folder on both CRS and ORACLE HOME are owned by ORACLE:DBA

Opatch Version check: ./opatch version

Opatch Inventory check: ./opatch lsinventory

Opatch conflict checking: ./opatch prereq CheckConflictAmongPatchesWithDetail -phBaseDir /u02/patch/22191577

After this create OCM response file. You can create either in grid opatch folder or db home opatch folder This will be used if you are using opatch auto

In my case I created the file in both

/u01/app/oracle/product/11.2.0/dbhome_2/OPatch/ocm/bin/emocmrsp
/u01/app/11204/OPatch/ocm/bin/emocmrsp

Skip the email ID and select Y. A file name ocm.rsp will be created.



We have main patch folder 22191577

In that folder we have 3 patch folders

21948348 - DB and Grid Home
21948347 - DB and Grid Home
21948355 - Only Grid Home

You can find which patch is for which home in Patch read me document

In my case

ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_2/
GRID_HOME=/u01/app/11204/


************************************************************************

If using Opatch Auto user must be root. You dont need to shutdown anything OPatch does it automatically

opatch auto
Root user
#./opatch auto /u02/patch/22191577 -ocmrf /u01/app/oracle/product/11.2.0/dbhome_2/OPatch/ocm/bin/ocm.rsp

************************************************************************

If you choose to do it manually you need to shutdown instance and CRS manually

Shutdown instances on node1 as oracle user
srvctl stop instance -d prod -i prod1

Shutdown crs on node1 as root user
crsctl stop crs

Root user
cd $GRID_HOME/crs/install
./rootcrs.pl -unlock   (If you don't execute this you get some permission errors related to patch storage and it complains not able to read and write files)


Oracle user
Grid home
/u01/app/11204/OPatch/opatch napply -oh /u01/app/11204 -local /u02/patch/22191577/21948348

/u01/app/11204/OPatch/opatch napply -oh /u01/app/11204 -local /u02/patch/22191577/21948355

/u01/app/11204/OPatch/opatch apply -oh /u01/app/11204 -local /u02/patch/22191577/21948347
 
Oracle user
DB home
/u02/patch/22191577/21948348/custom/server/21948348/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0/dbhome_2

/u01/app/oracle/product/11.2.0/dbhome_2/OPatch/opatch napply -oh /u01/app/oracle/product/11.2.0/dbhome_2/. -local /u02/patch/22191577/21948348/custom/server/21948348

/u01/app/oracle/product/11.2.0/dbhome_2/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0/dbhome_2/ -local /u02/patch/22191577/21948347 

/u02/patch/22191577/21948348/custom/server/21948348/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0/dbhome_2

After completion
Root user
# /u01/app/oracle/product/11.2.0/dbhome_2/rdbms/install/rootadd_rdbms.sh
# /u01/app/11204/crs/install/rootcrs.pl -patch


Once you are done with patching first node1
Start the instance
srvctl start instance -d prod -i prod1

***********************************************************************

Once 1st instance is started repeat the same steps on node2

***********************************************************************

After the two instances started up

Refer the read me file to see post patch instructions. In this psu i have to do the following.

We should do this only in 1 instance.

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

After the above command is complete it will show if the log file location. You can grep it for errors.

You can also run @utlrp.sql and compile invalid objects in the database.

************************************************************************

Rollback instructions

If using opatch auto

# opatch auto /u02/patch/22191577/ -rollback -ocmrf /u01/app/oracle/product/11.2.0/dbhome_2/OPatch/ocm/bin/ocm.rsp

If doing manually..shutdown instance and CRS manually

Shutdown instances on node1 as oracle user
srvctl stop instance -d prod -i prod1

Shutdown crs on node1 as root user
crsctl stop crs

Root user
cd $GRID_HOME/crs/install
./rootcrs.pl -unlock   (If you don't execute this you get some permission errors related to patch storage and it complains not able to read and write files)


Oracle user
Grid home
/u01/app/11204/OPatch/opatch rollback -local -id 21948348 -oh /u01/app/11204

/u01/app/11204/OPatch/opatch rollback -local -id 21948355 -oh /u01/app/11204 
 
/u01/app/11204/OPatch/opatch rollback -local -id 21948347 -oh /u01/app/11204
 
Oracle user
DB home
/u02/patch/22191577/21948348/custom/server/21948348/custom/scripts/prepatch.sh -dbhome /u01/app/oracle/product/11.2.0/dbhome_2

/u01/app/oracle/product/11.2.0/dbhome_2/OPatch/opatch rollback -local -id 21948348 -oh /u01/app/oracle/product/11.2.0/dbhome_2

/u01/app/oracle/product/11.2.0/dbhome_2/OPatch/opatch rollback -local -id 21948347  -oh /u01/app/oracle/product/11.2.0/dbhome_2

/u02/patch/22191577/21948348/custom/server/21948348/custom/scripts/postpatch.sh -dbhome /u01/app/oracle/product/11.2.0/dbhome_2

After completion
Root user
# /u01/app/oracle/product/11.2.0/dbhome_2/rdbms/install/rootadd_rdbms.sh
# /u01/app/11204/crs/install/rootcrs.pl -patch


Once you are done with patching first node1
Start the instance
srvctl start instance -d prod -i prod1

Repeat same steps on Node2

After both instances are UP. Run the following only on one instance

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

Also run @utlrp.sql

After everything is completed you can verify if patches are applied properly for both homes

Go to Opatch folder

cd /u01/app/oracle/product/11.2.0/dbhome_2/OPatch

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_2/

./opatch lsinventory

The above lists patches to oracle home.

Now change ORACLE_HOME path to grid home

export ORACLE_HOME=/u01/app/11204

./opatch lsinventory

Now it will list patches applied to grid home.

To further check in DB. Run the following sql statements

select comments, version, bundle_series
from sys.registry$history
where bundle_series = 'PSU'
order by action_time;

select comments Last_patch from dba_registry_history order by action_time desc;
 

标签:homes,RAC,dbhome,app,manual,opatch,patch,oracle,u01
From: https://www.cnblogs.com/lkj371/p/16893726.html

相关文章

  • [Oracle] 11gR2 GI Node May not Join the Cluster After Private Network is Functio
    11gR2GINodeMaynotJointheClusterAfterPrivateNetworkisFunctionalAfterEvictionduetoPrivateNetworkProblem(文档ID1479380.1)InthisDocument......
  • Notes for RAC Installation
    NotesforRACInstallation Problem#1: RACnodedoesfailstostartCRSafterturningoff1Infinibandswitch Symptom:AfteroneoftheredundantInfin......
  • 认识 MySQL OPTIMIZER_TRACE--转
    手把手教你认识OPTIMIZER_TRACE前 言我们在日常维护数据库的时候,如果遇到慢语句查询的时候,我们一般会怎么做?执行EXPLAIN去查看它的执行计划? ......
  • 设置oracle19c开机自启动
    1、以root身份登录系统,修改oratab,如下图所示:vi/etc/oratab进入vi编辑器后,找到“ORCL:/u01/app/oracle/product/19.3.0/db_1::N”将文件最后面的N,修改为Y,如下:......
  • Open Cascade 中的 AIS_InteractiveContext、V3d_Viewer 与 V3d_View 之间的关系
    转载请注明原文链接:https://www.cnblogs.com/mechanicoder/p/16892989.html1.前言本想通过Context与Viewer的多对一关系尝试实现三维视图图层、图元分类管理的功能,......
  • 解决:ORA-01034: ORACLE not available问题
    1先看oracle的监听和oracle的服务是否都启动了。启动oracle监听:cmd的命令行窗口下,输入lsnrctlstart,回车即启动监听。2查看oracle的sid叫什么,比如创建数据库的时候,实例名......
  • Promise.all、race和any方法都是什么意思?
    ////执行多个并行任务constpromiseAll=[thenFs.readFile('./files/1.txt','utf8'),thenFs.readFile('./files/2.txt','utf8'),thenFs.readFile('./f......
  • Oracle配置st_shapelib.dll(转)
    首先当然是找到st_shapelib.dll或st_geometry.dll文件,比如我本机的:C:\soft\ArcGIS\Desktop10.2\DatabaseSupport\Oracle\Windows64目录下找到st_shapelib.dll文件。......
  • oracle触发器简单使用
    触发器的作用数据确认,实施复杂的安全性检查,数据的备份和同步,对于违反规定数据库操作进行监控 触发器创建语法 创建前置触发器,在执行insert操作时,自动修改创建时间......
  • Oracle中的substr()函数,截取字符串
    实例、selectsubstr('HelloWorld',0,3)valuefromdual;//返回结果:Hel,截取从“H”开始3个字符、selectsubstr('HelloWorld',1,3)valuefromdual;//返回结果:Hel,截取......