Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label Upgrade Oracle Grid from 18c to 19c. Show all posts
Showing posts with label Upgrade Oracle Grid from 18c to 19c. Show all posts

Saturday, December 28, 2019

Upgrade Oracle Grid from 18c to 19c


Upgrade Oracle Grid from 18c to 19c

Upgrade oracle grid infrastructure to 19C

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

Upgrading Grid to 19c

You need to download following file:
LINUX.X64_193000_grid_home.zip

STEP 1 Grid Upgrade:

Oracle Grid upgrade from 18c to 19c
Preparation:
Keep following detail for later

srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwasm
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.259.1019395497
ASM diskgroup discovery string: /dev/sd*

Stop ASM, Database and Listener:
This command is related to the pluggable DB. If you do not have Multitenant DB then you don’t need to use following command.
alter pluggable database KARDBPDB close immediate;
srvctl status database -d KARDBPRD
Database is running.
srvctl stop database -d KARDBPRD

srvctl status  listener -l LISTENER
srvctl stop listener -l LISTENER

srvctl status asm
ASM is running on kardbprd.us.com
srvctl stop asm -f

crsctl stop has <<== no need to stop Clusterware
crsctl stat res –t

Create NEW directory for NEW Grid home:
Unzip the LINUX.X64_193000_grid_home.zip in the new $GRID_HOME
unzip LINUX.X64_193000_grid_home.zip -d /oracle/app/home/product/19.0.0/grid_19

Precheck Tasks:

/oracle/app/home/product/19.0.0/grid_19/runcluvfy.sh stage -pre hacfg
Verifying Physical Memory ...PASSED
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...PASSED
Verifying Free Space: kardbprd.us.com:/usr,kardbprd.us.com:/var,kardbprd.us.com:/etc,kardbprd.us.com:/sbin,kardbprd.us.com:/tmp ...PASSED
Verifying User Existence: oracle ...
  Verifying Users With Same UID: 1001 ...PASSED
Verifying User Existence: oracle ...PASSED
Verifying Group Existence: dba ...PASSED
Verifying Group Membership: dba ...PASSED
Verifying Run Level ...PASSED
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying Package: kmod-20-21 (x86_64) ...PASSED
Verifying Package: kmod-libs-20-21 (x86_64) ...PASSED
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: gcc-c++-4.8.2 ...PASSED
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...PASSED
Verifying Package: libxcb-1.11 (x86_64) ...PASSED
Verifying Package: libX11-1.6.3 (x86_64) ...PASSED
Verifying Package: libXau-1.0.8 (x86_64) ...PASSED
Verifying Package: libXi-1.7.4 (x86_64) ...PASSED
Verifying Package: libXtst-1.2.2 (x86_64) ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...PASSED

Pre-check for Oracle Restart configuration was successful.

CVU operation performed:      stage -pre hacfg
Date:                         Dec 10, 2019 11:18:20 AM
CVU home:                     /oracle/app/home/product/19.0.0/grid_19/
User:                         oracle

Starting with Upgrade:
I am using MobaXterm for X display.
export DISPLAY=xxx.xx.xx.xx:0.0
unset ORACLE_BASE
unset ORACLE_HOME
unset ORACLE_SID

./gridSetup.sh
Chose following options:
=>> Upgrade Oracle Grid Infrastructure
=>> uncheck --Register with Enterprise Manager (EM) Cloud Control
=>> Oracle base: /oracle/app/home (keep the same)
=>> uncheck --Automatically run configuration script
=>> Submit
=>> execute following script as root user:
/oracle/app/home/product/19.0.0/grid_19/rootupgrade.sh

Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/app/home/product/19.0.0/grid_19

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/app/home/product/19.0.0/grid_19/crs/install/crsconfig_params
The log of current session can be found at:
  /oracle/app/home/crsdata/kardbprd.us.com/crsconfig/roothas_2019-12-10_11-31-34AM.log
2019/12/10 11:31:35 CLSRSC-595: Executing upgrade step 1 of 12: 'UpgPrechecks'.
2019/12/10 11:31:38 CLSRSC-595: Executing upgrade step 2 of 12: 'GetOldConfig'.
2019/12/10 11:31:40 CLSRSC-595: Executing upgrade step 3 of 12: 'GenSiteGUIDs'.
2019/12/10 11:31:40 CLSRSC-595: Executing upgrade step 4 of 12: 'SetupOSD'.
2019/12/10 11:31:40 CLSRSC-595: Executing upgrade step 5 of 12: 'PreUpgrade'.

ASM has been upgraded and started successfully.

2019/12/10 11:32:56 CLSRSC-595: Executing upgrade step 6 of 12: 'UpgradeAFD'.
2019/12/10 11:32:57 CLSRSC-595: Executing upgrade step 7 of 12: 'UpgradeOLR'.
clscfg: EXISTING configuration version 0 detected.
Creating OCR keys for user 'oracle', privgrp 'dba'..
Operation successful.
2019/12/10 11:33:01 CLSRSC-595: Executing upgrade step 8 of 12: 'UpgradeOCR'.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node kardbprd.us.com successfully pinned.
2019/12/10 11:33:03 CLSRSC-595: Executing upgrade step 9 of 12: 'CreateOHASD'.
2019/12/10 11:33:04 CLSRSC-595: Executing upgrade step 10 of 12: 'ConfigOHASD'.
2019/12/10 11:33:05 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2019/12/10 11:33:50 CLSRSC-595: Executing upgrade step 11 of 12: 'UpgradeSIHA'.

kardbprd.us.com     2019/12/10 11:34:50     /oracle/app/home/crsdata/kardbprd.us.com/olr/backup_20191210_113450.olr     724960844

kardbprd.us.com     2019/09/19 13:17:50     /oracle/app/home/product/18.0.0/grid_18/cdata/kardbprd.us.com/backup_20190919_131750.olr     70732493
2019/12/10 11:34:50 CLSRSC-595: Executing upgrade step 12 of 12: 'InstallACFS'.
2019/12/10 11:37:47 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

I just want to make sure that everything works properly after upgrade. I am going stop everything and will start again.
srvctl status asm
crsctl stat res -t
srvctl stop asm -f
crsctl stop has
crsctl start has
srvctl start asm

Adjust the location and any parameter required in the tnsnames.ora file
srvctl stop listener -l LISTENER
srvctl start listener -l LISTENER

Stop/Start DB from the DB_HOME
srvctl stop database -d KARDBPRD
srvctl start database -d KARDBPRD

Login into DB and in ASM Instance and verify the standard configurations.


$ sqlplus / as sysasm
SQL*Plus: Release 18.0.0.0.0 - Production on Mon Nov 25 13:38:48 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.

Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

Check the status of the Pluggable database.

col NAME format a30
col OPEN_TIME format a40
set linesize 200
SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS;
alter pluggable database KARDBPDB open;

This will open all pluggable databases.
alter pluggable database all open;

Stop PDB command:
alter pluggable database KARDBPDB close immediate;
This will close all pluggable databases.
alter pluggable database all close immediate;

Login into ASM Instance and verify the standard configurations.

sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Dec 10 12:19:51 2019
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

If You are satisfied with the upgrade and application test then change the compatibility parameter on  ASM disk groups.

col VALUE format a30;
col COMPATIBILITY form a10
col DATABASE_COMPATIBILITY form a10
col NAME form a20
select group_number, name, compatibility, database_compatibility from v$asm_diskgroup;
select g.name,a.name,a.value from v$asm_diskgroup g, v$asm_attribute a where g.group_number=a.group_number and a.name like '%compat%';

alter diskgroup DATA SET attribute 'compatible.asm'='19.0.0.0.0';
compatible.rdbms muste be the same as DB.
alter diskgroup DATA set attribute 'compatible.rdbms'='18.0.0.0.0';

Start the Database after ASM compatibility parameters are changed.

Done:

The best person is the one who benefits all human beings. [Prophet Muhammad (PBUH)]

April Patch 19c 2025

   Oracle Critical Patch Update on 19c - January 2025 Oracle Critical Patch Update (CPU) 19.27.0.0.250415 GI RU Combo: Patch 37591516 - Comb...