Skip to main content
Delphix

KBA1772 Testing an Oracle Upgrade Using Rewind

 

 

Issue

If you want to test your Oracle upgrades, you can use Delphix to provision a VDB, test your upgrade and then if required rewind the database to repeat the upgrade process. Downgrading the version of the ORACLE_HOME is not permitted in the Delphix UI version 5.2 or greater. To downgrade the CLI must be used (see below).

Example

In this example, we will be upgrading a VDB from Oracle 11.2.0.4 to Oracle 12.1.0.2.

Provision the VDB

We have provisioned a VDB called ORCL. You can see from the Configuration tab (below) that the Version is 11.2.0.4.0 and the ORACLE_HOME (Repository) is /u01/app/ora11204/production/11.2.0/dbhome_1.

clipboard_e1dd91e9f5d2d6cd6923f7e30d11a8f37.png

From sqlplus, we can check the version information including the compatible parameter.

SQL> col host_name format a20
SQL> select instance_name, host_name, version from v$instance;

INSTANCE_NAME    HOST_NAME            VERSION
---------------- -------------------- -----------------
ORCL             rh73-ora-tgt         11.2.0.4.0

SQL> col comp_name format a40
SQL> select comp_name,version,status from dba_registry;

COMP_NAME                                VERSION                        STATUS
---------------------------------------- ------------------------------ -----------
OWB                                      11.2.0.4.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.

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      11.2.0.4.0
Upgrade the VDB

Now, we can upgrade the VDB using whatever method we want, for example using dbua (Database Upgrade Assistant).

  • The VDB will be showing status of "Stopped" in the Delphix UI during the upgrade but then should change to "Running" once the upgrade is complete.

Once the upgrade is complete, we need to update the ORACLE_HOME in the UI.

  • Select the "Upgrade" option for the upgraded VDB, in this example, it is ORCL

clipboard_e70ded8ff5b9890004c82901eda8435cb.png

  • And then select your new ORACLE_HOME from the drop down list, in this example it is 12.1
  • Note: If you cannot find your new ORACLE_HOME in the list of possible homes, you may need to refresh the environment first.

clipboard_eb6dbfd5b277a7a4b9a9a3a2a0637810f.png

Once this has been done you should be able to stop and start your VDB successfully via the UI.

You may now want to take a post-upgrade snapshot.

  • Click on the "camera" icon for this VDB

From sqlplus, we can check the version information including the compatible parameter.

SQL> col host_name format a20
SQL> select instance_name, host_name, version from v$instance;

INSTANCE_NAME    HOST_NAME            VERSION
---------------- -------------------- -----------------
ORCL             rh73-ora-tgt         12.1.0.2.0

SQL> col comp_name format a40
SQL> select comp_name,version,status from dba_registry;

COMP_NAME                                VERSION                        STATUS
---------------------------------------- ------------------------------ -----------
Oracle Application Express               4.2.5.00.08                    VALID
OWB                                      11.2.0.4.0                     VALID
OLAP Catalog                             11.2.0.4.0                     OPTION OFF
Spatial                                  12.1.0.2.0                     VALID
Oracle Multimedia                        12.1.0.2.0                     VALID
Oracle XML Database                      12.1.0.2.0                     INVALID
Oracle Text                              12.1.0.2.0                     VALID
Oracle Workspace Manager                 12.1.0.2.0                     VALID
Oracle Database Catalog Views            12.1.0.2.0                     VALID
Oracle Database Packages and Types       12.1.0.2.0                     VALID
JServer JAVA Virtual Machine             12.1.0.2.0                     VALID
Oracle XDK                               12.1.0.2.0                     VALID
Oracle Database Java Packages            12.1.0.2.0                     VALID
OLAP Analytic Workspace                  12.1.0.2.0                     VALID
Oracle OLAP API                          12.1.0.2.0                     INVALID

15 rows selected.

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      12.1.0
noncdb_compatible                    boolean     FALSE
Rewind the VDB to 11.2

You may want to keep it on 12.1 or maybe you want to rewind it to 11.2 to repeat the test or to try a different upgrade method.

  • First we need to point the VDB to the old ORACLE_HOME via the CLI
code5251.dcenter> /sourceconfig; select ORCL; update;
code5251.dcenter sourceconfig 'ORCL' update *> set repository=rh73-ora-tgt-90ZO-45481/'/u01/app/ora11204/product/11.2.0/dbhome_1';
code5251.dcenter sourceconfig 'ORCL' update *> commit

Note 1: The repository is the environment_name/ORACLE_HOME

Note 2: Rapidly hit the "tab" key twice after typing "set repository=" to make the CLI present a list of available environments and oracle home pairs

  • If we changed the Oracle compatible parameter as part of the upgrade, we will need to change it back for this VDB via the CLI
code5251.dcenter> /source; select ORCL; update
code5251.dcenter source 'ORCL' update *> edit configParams
code5251.dcenter source 'ORCL' update configParams *> set compatible='11.2.0.4'
code5251.dcenter source 'ORCL' update configParams *> commit
  • Rewind the VDB via the UI
    • Go to the "Timeflow" tab and select "Rewind" on the pre-upgrade snapshot

Once complete, we can check the version information including the compatible parameter from sqlplus

SQL> col host_name format a20
SQL> select instance_name, host_name, version from v$instance;

INSTANCE_NAME    HOST_NAME            VERSION
---------------- -------------------- -----------------
ORCL             rh73-ora-tgt         11.2.0.4.0

SQL> col comp_name format a40
SQL> select comp_name,version,status from dba_registry;

COMP_NAME                                VERSION                        STATUS
---------------------------------------- ------------------------------ -----------
OWB                                      11.2.0.4.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.

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      11.2.0.4
Rewind the VDB to 12.1

You may want to keep it on 11.2 or maybe you want to go back to the post-upgrade 12.1 snapshot

  • First we need to point the VDB to the new ORACLE_HOME via the CLI
code5251.dcenter> /sourceconfig; select ORCL; update;
code5251.dcenter sourceconfig 'ORCL' update *> set repository=rh73-ora-tgt-90ZO-45481/'/u02/app/ora12102/product/12.1.0/dbhome_1';
code5251.dcenter sourceconfig 'ORCL' update *> commit
  • If we changed the Oracle compatible parameter as part of the upgrade, we will need to change it back for this VDB via the CLI
code5251.dcenter> /source; select ORCL; update
code5251.dcenter source 'ORCL' update *> edit configParams
code5251.dcenter source 'ORCL' update configParams *> set compatible='12.1.0'
code5251.dcenter source 'ORCL' update configParams *> commit
  • Rewind the VDB via the UI
    • Go to the "Timeflow" tab and select "Rewind" on the post-upgrade snapshot

 

 

 

Related Bugs:

  • DLPX-60319 After upgrade of oracle db, rewind is using new compatible instead of old
  • DLPX-60320 Can't choose older ORACLE_HOME from upgrade button in UI