Skip to main content
Delphix

Oracle Upgrades Involving New Oracle Home Installations and Delphix Virtualization Engine dSources (KBA1759)

 

Applicable Delphix Versions

Major Release

All Sub Releases

5.2 5.2.2.0, 5.2.2.1, 5.2.3.0

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1 ,5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

4.3

4.3.1.0, 4.3.2.0, 4.3.2.1, 4.3.3.0, 4.3.4.0, 4.3.4.1, 4.3.5.0

Issue

Upgrading the Oracle RDBMS software often involves the establishment of a new Oracle Home path in which the new release of the Oracle binaries is placed.  Oracles supplied database upgrade assistant (dbua) can be used perform this task once the new Oracle Home and release are in place.  DBUA performs the task of migrating the database(s) running from the old Oracle Home across to the new Oracle Home and then executing any post upgrade scripts that might be required. Once this has been completed the Delphix Virtualisation Engine dSources that were using the old Oracle Home needs be aligned with the new Oracle Home.  This is not performed automatically and if Delphix believes the old home is still in use operations like snapsync performed against the dSources will fail.

This knowledge base article has been put together to shed light on some of the processes involved in upgrading Oracle Homes used by Delphix dSources and how to account for this within Delphix.

Warning : Upgrading Oracle Databases must be performed by an Oracle DBA in accordance with the version specific process supplied by Oracle themselves. The process detailed in this article is for educational purposes only and is no way meant to replace Oracles documented upgrade processes.

Background

There are two Oracle Homes in play in this example of the upgrade process. The intention is to upgrade the dSource from Oracle 11.2.0.2 to 11.2.0.4.

o The original Oracle Home at release 11.2.0.2 that is currently in use by the dSource.

orc112:/u01/app/oracle/product/11.2.0.2/dbhome_1:N

In the Delphix UI we see only the 11.2.0.2 prior to adding the new 11.2.0.4 Oracle Home.

clipboard_e2bedc01ee5dc10a5a42d2fa60fcc22c8.png

o The new Oracle Home at release 11.2.0.4 that the dSource will be moved to in its upgraded version.

home11204:/u01/app/oracle/product/11.2.0.4/dbhome_1:N

o The installation of this new Oracle Home will be performed by the DBA team or team responsible for maintaining the Oracle software. After the installation of the new ORACLE_HOME is performed, a refresh of the Delphix environment will need to be performed in order for the new Oracle software to be discovered and added to Delphix.  Once the refresh has completed the new software should appear for the environment within the Delphix GUI.

clipboard_ec3f360b53938c120bba3498fd72caf79.png

o A dSource called "o112" that has been linked to the Delphix Virtualisation Engine. Note the 11.2.0.2 is in place.

clipboard_e235d741c62dfe633cf965025e897ed91.png

Upgrading Oracle

o The installation of this new Oracle Home will be performed by the DBA team or team responsible for maintaining the Oracle software

o After the installation of the new ORACLE_HOME is performed, a refresh of the Delphix environment will need to be performed in order for the new Oracle software to be discovered and added to Delphix.

o Once the refresh has completed the new software should appear for the environment within Delphix.

o The upgrade of the dSource Oracle RDBMS will be performed by the DBA team or a team responsible for maintaining the Oracle RDBMS.

o In this example the upgrade was performed through dbua

o Currently we can see the current home being used by the Oracle instances processes through its environment and the ORACLE_HOME environment variable which is pointing to the 11.2.0.2 home (ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/dbhome_1)

[oracle@oel6sin1 ~]$ ps -ef | grep pmon
oracle   10402     1  0 17:28 ?        00:00:00 ora_pmon_o112
oracle   22146  9811  0 17:40 pts/2    00:00:00 grep pmon
[oracle@oel6sin1 ~]$ ps e -ww -p 10402
  PID TTY      STAT   TIME COMMAND
10402 ?        Ss     0:00 ora_pmon_o112 HOSTNAME=oel6sin1.plb.internal 
TERM=xterm-256color SHELL=/bin/bash 
HISTSIZE=1000 SSH_CLIENT=192.168.0.15 61378 22 
QTDIR=/usr/lib64/qt-3.3 OLDPWD=/u01/app/oracle/product/11.2.0.2/dbhome_1/network/admin 
QTINC=/usr/lib64/qt-3.3/include SSH_TTY=/dev/pts/2 USER=oracle 
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0.2/dbhome_1/lib 
ORACLE_SID=o112 ORACLE_BASE=/u01/app/oracle MAIL=/var/spool/mail/oracle 
..
.
ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/dbhome_1 
ORA_NET2_DESC=9,12 ORACLE_SPAWNED_PROCESS=1 SKGP_SPAWN_DIAG_PRE_FORK_TS=1534231738 
SKGP_SPAWN_DIAG_POST_FORK_TS=1534231738 SKGP_SPAWN_DIAG_PRE_EXEC_TS=1534231738
[oracle@oel6sin1 ~]$ 

o To perform the upgrade the environment needs to be set to the new ORACLE_HOME before invoking dbua. The file /etc/oratab (linux) can be used to locate the home if the DBA's have placed an entry in here.

[oracle@oel6sin1 admin]$ egrep '11.2.0.4' /etc/oratab
home11204:/u01/app/oracle/product/11.2.0.4/dbhome_1:N

[oracle@oel6sin1 admin]$ . oraenv
ORACLE_SID = [orc112] ? home11204
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oel6sin1 admin]$ export ORACLE_SID=o112

[oracle@oel6sin1 admin]$ dbua

o DBUA will appear and the upgrade is performed through following the wizard through to its completion.

clipboard_e923da05f945d1957b442ccf31eebc0b9.png

o Ensure the correct database is selected to perform the upgrade against.

clipboard_ebca8c817170fb9370bd1e3f9ad22eb92.png

o Set the upgrade options like the recompilation of any invalid PL/SQL code held with the database. Please note not all screens presented by dbua are shown in this example to manage the size of the knowledge base article.

clipboard_e4e72b692295f9922b46d026d797f69fe.png

o A summary screen is presented after all steps in the wizard have been completed.

clipboard_e7419591e964ca4ae0329b533f195bc58.png

o Clicking on finish will kick the upgrade off and dbua will stop the database, relocate it to its new Oracle Home, restart it and perform the upgrade of the RDBMS internals.

clipboard_e164a8e91015435dfb622cf649784ab10.png

clipboard_e38038958cdb1b133ee47c72ad7e80db1.png

clipboard_e60132705c20a8d93c24f368b70405202.png

Please note: this example demonstrates a successful upgrade.  Should any problems be encountered during the upgrade process the database will potentially need to be restored from a backup captured prior to starting the upgrade process, the problem encountered rectified and the upgrade performed once more.

o Once the dbua wizard has completed the upgrade the dSource has been upgraded from Oracles perspective.  Please note the amount of time taken to perform the upgrade can take tens of minutes through to several hours.

o The /etc/oratab entry for the dSoure will have been adjusted by dbua and reflect the new home post upgrade.

home11204:/u01/app/oracle/product/11.2.0.4/dbhome_1:N
o112:/u01/app/oracle/product/11.2.0.4/dbhome_1:N

o To confirm the state of the dSource database post upgrade a few basic checks should be performed.

o Set the environment using the new oratab entry.

[oracle@oel6sin1 ~]$ . oraenv
ORACLE_SID = [o112] ? o112
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oel6sin1 ~]$ set | grep ORA
OLD_ORACLE_BASE=/u01/app/oracle
ORABASE_EXEC=/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/orabase
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
ORACLE_SID=o112
ORAHOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
ORASID=o112

o The processes environment has been aligned to the new Oracle Home

[oracle@oel6sin1 ~]$ ps -ef | grep pmon
oracle   26023     1  0 18:39 ?        00:00:00 ora_pmon_o112
oracle   26166  9811  0 18:43 pts/2    00:00:00 grep pmon
[oracle@oel6sin1 ~]$ ps e -ww -p 26023
  PID TTY      STAT   TIME COMMAND
26023 ?        Ss     0:00 ora_pmon_o112 

XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt GDM_LANG=en_US.UTF-8 LANG=en_US.UTF-8
ORACLE_BASE=/u01/app/oracle ORACLE_SID=o112
ORBIT_SOCKETDIR=/tmp/orbit-oracle XMODIFIERS=@im=none G_BROKEN_FILENAMES=1
HOME=/home/oracle GDM_KEYBOARD_LAYOUT=gb
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0.4/dbhome_1/lib:/u01/app/oracle/product/11.2.0.4/dbhome_1/jdk/jre/lib/amd64/server:
                /u01/app/oracle/product/11.2.0.4/dbhome_1/jdk/jre/lib/amd64:/u01/app/oracle/product/11.2.0.4/dbhome_1/jdk/jre/../lib/amd64:
                /etc/ORCLcluster/oracm/lib:/u01/app/oracle/product/11.2.0.4/dbhome_1/lib:/u01/app/oracle/product/11.2.0.4/dbhome_1/network/lib:
                /u01/app/oracle/product/11.2.0.4/dbhome_1/lib
                
USER=oracle QTINC=/usr/lib64/qt-3.3/include
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1
SHELL=/bin/bash LOGNAME=oracle

 o The database instance is now showing the new release.

SQL> select instance_name,version,status from v$instance;

INSTANCE_NAME     VERSION       STATUS
---------------- ----------------- ------------
o112         11.2.0.4.0       OPEN

o The database software components are also showing 11.2.0.4 where appropriate.

SQL> SET PAGESIZE 60
SET LINESIZE 300
SET VERIFY OFF
COL comp_name FOR a44 HEA 'Component' 
COL version FOR a17 HEA 'Version' 
COL status FOR a17 HEA 'Status' 
 
SELECT comp_name, version, status FROM dba_registry;

Component                                     Version           Status
-------------------------------------------- ----------------- -----------------
OWB                                           11.2.0.2.0        VALID
Oracle Application Express                    3.2.1.00.12       VALID
Oracle Enterprise Manager                     11.2.0.4.0        VALID
OLAP Catalog                                  11.2.0.4.0        VALID
Spatial                                       11.2.0.4.0        VALID
Oracle Multimedia                             11.2.0.4.0        VALID
Oracle XML Database                           11.2.0.4.0        VALID
Oracle Text                                   11.2.0.4.0        VALID
Oracle Expression Filter                      11.2.0.4.0        VALID
Oracle Rules Manager                          11.2.0.4.0        VALID
Oracle Workspace Manager                      11.2.0.4.0        VALID
Oracle Database Catalog Views                 11.2.0.4.0        VALID
Oracle Database Packages and Types            11.2.0.4.0        VALID
JServer JAVA Virtual Machine                  11.2.0.4.0        VALID
Oracle XDK                                    11.2.0.4.0        VALID
Oracle Database Java Packages                 11.2.0.4.0        VALID
OLAP Analytic Workspace                       11.2.0.4.0        VALID
Oracle OLAP API                               11.2.0.4.0        VALID

18 rows selected.

Changes required in Delphix after Upgrading the Oracle Release

o An environment refresh should be performed post upgrade.  This will allow Delphix to gather information about the current state of the Oracle Homes, listeners in place, databases running and any other Oracle alterations appearing in the environment.

o Immediately following the upgrade Delphix still believes the dSource is running from the 11.2.0.2 Oracle Home.

clipboard_e444b18b270b646147a0db66f9595d00a.png

o To align Delphix and the details held in regards to the dSource o112 the UI can be used to upgrade the dSource.  All this is really doing is moving the dSources configuration from the old home to the new home and only adjusts meta data held within Delphix itself.

o While the old version remains in place on the Delphix side dSource snapsync operations will fail.

clipboard_e1f2b8f62facb08460f15f3e663c05f24.png

o To align the database with the new Oracle Home and the 11.2.0.4 release that the dSource is actually using now use the "Upgrade" menu item.

clipboard_e339921217ebc7bfa2978a307bd000eea.png

o Select the new Oracle Home from which the dSource o112 is now running post upgrade or patching.

clipboard_e0d11b740a705d4acbe1dee734eb58365.png

o The Delphix GUI and CLI should now reflect the location of the new home and the version of the new release for the dSource.

clipboard_e678b6b442f3c260cf5b2eba3305e91d9.png

External Links

Upgrading Oracle

https://docs.oracle.com/cd/E11882_01/server.112/e23633/toc.htm