Anasayfa » ORACLE Database Grid 19C Upgrade 19.3 to 19.9

Share This Post

Oracle

ORACLE Database Grid 19C Upgrade 19.3 to 19.9

Bildiğiniz gibi Oracle her 6 aylık periyotta Patch Set Update yayınları yapar. ” https://www.oracle.com/security-alerts/ ” üzerinden takip edebileceğimiz bu yamalar gerek Grid ortamın gerekse veritabanının güvenli , performans ve stabil olarak olarak çalışması için gereklidir.

Bugünkü yazımızda ise Grid Infrastructure üzerinde kurulu Oracle Database 19.3 veritabanımızı nasıl upgrade edeceğimizi anlatacağım. Upgrade edeceğimiz veritabanı 19.3 olarak çalışmakta ve bunu 19.9 olarak güncelleyeceğiz.

Adımlarımız basit olacak, öncelikle grid daha sonra database upgrade işlemi gerçekleşecek. Öncelikle support üzerinden aşağıdaki yüklemeleri yapıyoruz.

GI Upgrade için : 31750108
DB Upgrade için : 31771877


Hadi başlayalım ;

$ mkdir -p /u01/patch /u01/patch/db df /u01/patch/grid
$ chown -R oracle:oinstall /u01/patch
$ chmod -R 775 /u01/patch

Öncelikle GI yani Grid upgrade yapacağız.

$ cd /u01/patch/grid
$ unzip p31750108_190000_Linux-x86-64.zip
$ <ORACLE_HOME>/OPatch/opatch version

[oracle@node1 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

Patch için kullandığım readme üzerinde Opatch versiyonun minimum 12.2.0.1.19 ve sonrası olması gerektiği belirtilmiş. Şimdi Opatch güncellemesi yapacağım. Yine support üzerinden son versionu ( Patch 6880880 ) indiriyorum.

$ cd /u01/app/19.0.0.0/grid
$ mv OPatch OPatch_old
$ unzip p6880880_200000_Linux-x86-64.zip
$ chmod -R 775 OPatch
$ chown -R oracle:oinstall OPatch

Güncellemeyi bir kontrol edelim.

[root@node1 OPatch]# ./opatch version
OPatch Version: 12.2.0.1.23

OPatch succeeded.

Şimdi tamamız. Devam edebiliriz.

Conflict yani bizi etkileyen başka bir patch varmı kontrol ediyoruz. Eğer varsa belirtilen patch numaraları ile rollback yapmamız gerekecek. Aşağıdaki gibi başlıyorum. İlk 5 adım GRID_HOME üzerinde son 2 adım ORACLE_HOME üzerinde olacak.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31771877

Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_16-46-17PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Bir problem görünmüyor diğerleri ile sıra sıra devam ediyorum.

$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31772784

Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_16-47-11PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31773437


Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_16-47-37PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31780966


Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_16-47-58PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/


Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_16-48-25PM_1.log

This command doesn't support System Patch.

OPatch failed with error code 21

En son veren hata bizim için önemli değil, bu satır aslında readme üzerinde fazladan var. Görmemezlikten geliyorum.

Oracle HOME üzerinden testleri yapıyorum.


$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31771877

Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-01-03_16-50-10PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/grid/31750108/31772784

Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-01-03_16-50-54PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Son aşamalara geliyoruz. Tmp içerisinde “patch_list_gihome.txt ” adında bir dosya açıyoruz ve aşağıdaki satırları ekliyoruz.

$ nano /tmp/patch_list_gihome.txt

/u01/patch/grid/31750108/31771877
/u01/patch/grid/31750108/31772784
/u01/patch/grid/31750108/31773437
/u01/patch/grid/31750108/31780966

Ekleme işlemi sonrası son kontrolleri yapıyoruz.

$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
[oracle@node1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/19.0.0.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/19.0.0.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/19.0.0.0/grid/cfgtoollogs/opatch/opatch2021-01-03_17-03-36PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" pass

OPatch succeeded.

GI için upgrade işlemimizi ” opatchauto ” ile yapacağız. Bu sayede CRS kapatma ve açma gibi tüm işlem otomatik olarak yapılacak.

# export PATH=$PATH:$ORACLE_HOME/OPatch
# opatchauto apply /u01/patch/grid//31750108 -oh /u01/app/19.0.0.0/grid

GI için Opatch işlemim başladı

[root@node1 OPatch]# opatchauto apply /u01/patch/grid//31750108 -oh /u01/app/19.0.0.0/grid

OPatchauto session is initiated at Sun Jan  3 17:29:48 2021

System initialization log file is /u01/app/19.0.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-01-03_05-29-52PM.log.

Session log file is /u01/app/19.0.0.0/grid/cfgtoollogs/opatchauto/opatchauto2021-01-03_05-29-57PM.log
The id for this session is P3IG

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0.0/grid
Patch applicability verified successfully on home /u01/app/19.0.0.0/grid


Executing patch validation checks on home /u01/app/19.0.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0.0/grid


Bringing down CRS service on home /u01/app/19.0.0.0/grid
Prepatch operation log file location: /u01/app/oracle/crsdata/node1/crsconfig/hapatch_2021-01-03_05-30-31PM.log
CRS service brought down successfully on home /u01/app/19.0.0.0/grid


Start applying binary patch on home /u01/app/19.0.0.0/grid
.
.
.
.

Eğer isterseniz log file location üzerinden durumu takip edebilirsiniz.

# tail -100f /u01/app/oracle/crsdata/node1/crsconfig/hapatch_2021-01-03_05-30-31PM.log
.
.
.
.
.
>End Command output
2021-01-03 17:30:57: Configured CRS Home: /u01/app/19.0.0.0/grid
2021-01-03 17:30:57: Executing cmd: /u01/app/19.0.0.0/grid/bin/crsctl check has
2021-01-03 17:30:57: Command output:
>  CRS-4639: Could not contact Oracle High Availability Services
>End Command output
2021-01-03 17:30:57: The GI home to unlock: /u01/app/19.0.0.0/grid
2021-01-03 17:30:57: Unlocking the GI home: /u01/app/19.0.0.0/grid
2021-01-03 17:30:57: Processing directory permissions
2021-01-03 17:30:57: set the permissions on the /u01/app/19.0.0.0/grid/jdk directory
2021-01-03 17:30:57: set the permissions on the /u01/app/19.0.0.0/grid/perl directory
2021-01-03 17:30:57: set the permissions on the /u01/app/19.0.0.0/grid/bin directory
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/asmcmdcore
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/asmcmdcore
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/extjob
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/cluvfyrac.sh
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/dbstart
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/extjobo
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/extjobo
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/extproc
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/oracle
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/oradism
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/relink
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/oklist0
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/xmlwf
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/asmcmd
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/jssu
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/onsctl
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/okinit0
2021-01-03 17:30:57: skip setting perms for exclude file /u01/app/19.0.0.0/grid/bin/okdstry0
2021-01-03 17:30:57: set the permissions on the /u01/app/19.0.0.0/grid/lib directory
2021-01-03 17:30:57: Executing cmd: /u01/app/19.0.0.0/grid/bin/clsecho -p has -f clsrsc -m 347 '/u01/app/19.0.0.0/grid'
2021-01-03 17:30:57: Executing cmd: /u01/app/19.0.0.0/grid/bin/clsecho -p has -f clsrsc -m 347 '/u01/app/19.0.0.0/grid'
2021-01-03 17:30:57: Command output:
>  CLSRSC-347: Successfully unlock /u01/app/19.0.0.0/grid
>End Command output
2021-01-03 17:30:57: CLSRSC-347: Successfully unlock /u01/app/19.0.0.0/grid
2021-01-03 17:30:57: Executing cmd: /u01/app/19.0.0.0/grid/bin/clsecho -p has -f clsrsc -m 671
2021-01-03 17:30:57: Executing cmd: /u01/app/19.0.0.0/grid/bin/clsecho -p has -f clsrsc -m 671

GI Patch işlemi tamamlandı ve başarılı bir şekilde işlemi bitirdik.

Host:node1
SIHA Home:/u01/app/19.0.0.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /u01/patch/grid/31750108/31771877
Log: /u01/app/19.0.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-01-03_17-31-00PM_1.log

Patch: /u01/patch/grid/31750108/31772784
Log: /u01/app/19.0.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-01-03_17-31-00PM_1.log

Patch: /u01/patch/grid/31750108/31773437
Log: /u01/app/19.0.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-01-03_17-31-00PM_1.log

Patch: /u01/patch/grid/31750108/31780966
Log: /u01/app/19.0.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-01-03_17-31-00PM_1.log



OPatchauto session completed at Sun Jan  3 17:38:50 2021
Time taken to complete the session 9 minutes, 2 seconds

Şimdi veritabanı için devam edeceğiz.

En baştan hızlıca Opatch güncellemesi yapıyorum. İndirdiğim son sürüm opatch buraya aktarıyorum.

$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1
$ mv OPatch OPatch_old
$ cp -r /u01/app/19.0.0.0/grid/OPatch /u01/app/oracle/product/19.0.0.0/dbhome_1/

Veritabanı güncellemelerine başlayalım.

$ cd /u01/patch/db
$ unzip p31771877_190000_Linux-x86-64.zip
$ $ORALCE_HOME/opatch version
OPatch Version: 12.2.0.1.23

OPatch succeeded.

Kontrollerimi yapıyorum

$ export PATH=$PATH:/usr/ccs/bin
$ cd /u01/patch/db/31771877

$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./


Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-01-03_17-47-55PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Sıkıntı görünmüyor. Şimdi Listener ve veritabanını kapatıyoruz.


$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 03-JAN-2021 17:49:39

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 3 17:49:44 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Ve Patch başlasın : )

$ $ORACLE_HOME/OPatch/opatch apply



Oracle Interim Patch Installer version 12.2.0.1.23
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.23
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-01-03_17-50-59PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   31771877

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.0.0.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '31771877' to OH '/u01/app/oracle/product/19.0.0.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.sqlj, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ]  not present in the Oracle Home or a higher version is found.

Database patch işlemi tamamlandı.

Patching component oracle.xdk.rsf, 19.0.0.0.0...

Patching component oracle.xdk.parser.java, 19.0.0.0.0...

Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...

Patching component oracle.precomp.common, 19.0.0.0.0...

Patching component oracle.precomp.lang, 19.0.0.0.0...

Patching component oracle.jdk, 1.8.0.201.0...
Patch 31771877 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [31771877].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/19.0.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-01-03_17-50-59PM_1.log

OPatch succeeded.

Bundan sonrası artık rahat. Bir bakalım neler olmuş.

$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 3 17:55:20 2021
Version 19.9.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

SQL>

Evet şuan yükselmiş görünüyor. Başarılı bir operasyon oldu.

Başka yazılarımızda görüşmek dileğiyle.

Share This Post

1 Comment

  1. Eline sağlık Buğra.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>