Oracle Patch Install/Apply
Öncelikle patch in README’si dikkatlice okunmalı ve gerekli şartlar yerine getirilmeli. Getirilemiyorsa devam edilmemeli Oracle Support SR açılmalı.
Oracle’ın Patch Geçme uygulaması OPatch in güncellenmesi için
OPatch - Where Can I Find the Latest Version of OPatch? [Video] (Doc ID 224346.1)
Direk patch i indirmek için. support.oracle.com -> "patches & updates" linkinden işletim sisteminize uygun olan 6880880 nolu patch indirilir.
OPatch uygulamasını güncelleyelim
rdbms_home
p6880880_112000_Solaris86-64.zip 'i /SetUp/oracle/patches dizinine indirdik.
|
1 2 |
cd /SetUp/oracle/patches unzip p6880880_112000_Solaris86-64.zip |
Hakları oracle kullanıcısına veriyoruz
chown -R oracle:oinstall /SetUp/oracle/patches/OPatch
cd /u01/app/oracle/product/11.2.0/db_1/OPatch
Eski versiyonu old dizinine yedekliyoruz.
|
1 2 |
mkdir old mv crs docs emdpatch.pl fmw jlib ocm opatch opatch.ini opatch.pl opatchprereqs old |
Yeni versiyonu kopyalıyoruz
|
1 |
cp -r /SetUp/oracle/patches/OPatch/* /u01/app/oracle/product/11.2.0/db_1/OPatch |
|
1 2 3 |
Kontrol edelim export PATH=$PATH:/u01/app/oracle/product/11.2.0/db_1/OPatch $ opatch lsinventory |
grid_home
Daha önce (rdbms_home u güncellerken) p6880880_112000_Solaris86-64.zip 'i /SetUp/oracle/patches dizinine indirip açmıştık (unzip) varsayıyoruz.
root ile
|
1 |
cd /SetUp/oracle/patches |
Hakları grid kullanıcısına veriyoruz. (grid_home un sahibi)
chown -R grid:oinstall /SetUp/oracle/patches/OPatch
cd /u01/11.2.0/grid/OPatch/
mkdir old
mv crs docs emdpatch.pl fmw jlib ocm opatch opatch.ini opatch.pl opatchprereqs old
cp -r /SetUp/oracle/patches/OPatch/* /u01/11.2.0/grid/OPatch/
Kontrol edelim
|
1 2 |
export PATH=$PATH:/u01/11.2.0/grid/OPatch $ opatch lsinventory |
"opatch" çalıştırılabilir shell script in path ini tanımlayalım.
|
1 2 3 4 |
rdbms için export PATH=$PATH:/u01/app/oracle/product/11.2.0/db_1/OPatch Grid için export PATH=$PATH:/u01/11.2.0/grid/OPatch |
Online patch install
|
1 2 |
cd /SetUp/patches/OdeaBank_Patch/11063191 opatch apply online -connectString mx1:oracle:0racle:dbk01,mx2:oracle:0racle:dbk02 |
deinstall/rollback
opatch rollback -id 11063191 -connectString mx1:oracle:0racle:dbk01,mx2:oracle:0racle:dbk02
not01 : opatch apply online -connectString SID_ISMI_1:rdbms_home_sahibi:sifre:node_ismi,SID_ISMI_2:rdbms_home_sahibi:sifre:node_ismi
not02 : node isimlerinde "-" sorun yapıyor sanırım . bir yerde online rollback yapılamadı.
ocm.rsp oluşturulması gerekirse
Grid home un sahibi kullanıcı ile (grid)
|
1 2 3 |
export PATH=$PATH:/usr/ccs/bin export PATH=$PATH:/u01/11.2.0/grid/OPatch $ORACLE_HOME/OPatch/ocm/bin/emocmrsp |
veya
|
1 |
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /SetUp/Grid_11.2.0.3.5/ocm.rsp |
root ile
|
1 2 3 4 5 |
örnekler opatch auto /SetUp/patch/grid -ocmrf /home/oracle/ocm.rsp opatch auto /SetUp/Patch/grid/14275605 -oh /u01/11.2.0/grid -ocmrf /home/grid/ocm.rsp opatch auto /SetUp/patch/grid/ -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /home/oracle/ocm.rsp opatch lsinventory -detail -oh /u01/11.2.0/grid/ |
Hem grid home hem de rdbms home a patch geçilmiş oldu.
Bilgi
|
1 |
patch lsinventory -detail -oh /u01/app/oracle/product/11.2.0/db_1 |
Cesitli
|
1 2 |
opatch napply -local -oh /u01/11.2.0/grid -id 9974223 opatch prereq CheckConflictAgainstOHWithDetail -ph ./ |
Following executables are active :
|
1 2 |
/u01/11.2.0/grid/lib/libclntsh.so.11.1 crsctl stop has |
Flow diagrams
All-Node Patch
. Shutdown all Oracle instances on all nodes
. Apply the patch to the RAC home on all nodes
. Bring all instances up
Minimum downtime
. Shutdown the Oracle instance on node 1
. Apply the patch to the RAC home on node 1
. Shutdown the Oracle instance on node 2
. Apply the patch to the RAC home on node 2
. Shutdown the Oracle instance on node 3
. At this point, instances on nodes 1 and 2 can be brought up
. Apply the patch to the RAC home on node 3
. Startup the Oracle instance on node 3
Rolling patch (no downtime)
. Shutdown the Oracle instance on node 1
. Apply the patch to the RAC home on node 1
. Start the Oracle instance on node 1
. Shutdown the Oracle instance on node 2
. Apply the patch to the RAC home on node 2
. Start the Oracle instance on node 2
. Shutdown the Oracle instance on node 3
. Apply the patch to the RAC home on node 3
. Start the Oracle instance on node 3
