Using Self Service Container Bookmarks to move Oracle Databases up and down Oracle software releases (KBA7167)
KBA
KBA# 7167
Issue
Moving Oracle Virtual Databases (VDBs) across different Oracle releases presents Delphix Administrators and Delphix Self Service users with challenges beyond those seen in which a Self Service bookmark operation is performed within a single Oracle software release. This knowledge base article has been created to address some of the current limitations that exist in the Delphix GUI that prevent moving a Self Service container and VDB between Oracle versions using Self Service bookmarks.
Prerequisites
- An Oracle dSource database that has been upgraded from one Oracle release to a higher Oracle release.
- Snapshots in the lower Oracle release still exist within the Delphix Virtualization Engine.
- Snapshots from the higher Oracle release still exist within the Delphix Virtualization Engine.
- The dSource database is associated with a Self Service Template.
- An Oracle Virtual Database has been created from this dSource and this is also linked to the Self Service Container.
- Bookmarks from the lower Oracle release exist for the VDB.
- Bookmarks from the higher release exist for the VDB.
- Both the lower release Oracle Home and the higher Oracle Home release exist on the host running the VDB.
- Both Oracle releases have been discovered by Delphix.
The Example Environment used to demonstrate the process:
- A dSource currently running Oracle 19c (19.3.0.0).
- A VDB currently running Oracle 19c (19.3.0.0).
- The dSource and VDB are Oracle Container databases with a single PDB.
- A host that contains both Oracle 12.2.0.1 and Oracle 19.3.0.0 software release each in its own Oracle Home.
- A Delphix Engine running 6.0.5.0.
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1
Resolution
Moving an Oracle VDB across different Oracle release versions must currently be performed through the Delphix CLI. Performing a move from a lower release to a higher release or from a higher release to a lower Oracle release involves the following process:
- Changing the Oracle Homes associated with the VDB
- Selecting an appropriate Self Service bookmark linked to a snapshot of the VDB captured using the desired destination Oracle release
- Forcing Delphix to bypass capturing the snapshot of the VDB it would normally preform prior to initiating a restore or refresh operation.
The following examples demonstrate the process and steps required to successfully move the VDB between Oracle releases using Self Service bookmarks. The article also begins with a demonstration of the failure expected should a restore attempt be made through the Delphix GUI.
A failed GUI based attempt to restore a VDB to an earlier release of Oracle using Self Service Bookmarks
In this example the following is in place in the Self Service Container.
- The running VDB is a 19c VDB
- The restore is to be performed through a bookmark and associated snapshot captured when the VDB was a 12.2.0.1 database.
- The restore is initiated using the bookmark labeled "Pre19cUpgrade_Bookmark".
- The Oracle VDB roll back associated with the bookmark restore operation fails reporting the VDB needs to be started with the upgrade option.
This makes sense as the binaries used to bring up the VDB instance are 19c and the database and dictionary version are 12.2.0.1.
- The recovery of the container to the pre-restore snapshot created as a part of the restore operation in Self Service is successful and the VDB is returned to a usable state once more.
To overcome this error a CLI based approach must be used.
Performing a CLI based Oracle version move from a higher release to a lower release
In this example the VDB version will move from the higher Oracle release, 19.3.0.0, to the lower release of Oracle 12.2.0.1 through a Self Service bookmark captured at the lower Oracle release.
- Set the repository for the VDB at the CDB level to the desired Oracle Home and Oracle version in this case 12.2.0.1.
The sourceconfig for the VDB, vcdb1221 shows its Oracle Home is set to the 19c home.
dlpx6050.plb.internal > sourceconfig dlpx6050.plb.internal sourceconfig> ls Objects NAME REPOSITORY LINKINGENABLED vcdb1221 OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' true db1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true PDB1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true vpdb1221 OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' true Operations create dlpx6050.plb.internal sourceconfig> select vcdb1221 dlpx6050.plb.internal sourceconfig 'vcdb1221'> ls Properties type: OracleSIConfig name: vcdb1221 cdbType: ROOT_CDB credentials: type: PasswordCredential password: ******** databaseName: vcdb1221 discovered: true environmentUser: OEL7SITDE2/delphix instance: type: OracleInstance instanceName: vcdb1221 instanceNumber: 1 linkingEnabled: true nonSysCredentials: (unset) nonSysUser: (unset) reference: ORACLE_SINGLE_CONFIG-3 repository: OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' services: 0: type: OracleService discovered: true jdbcConnectionString: jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.129)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=vcdb1221))) tdeKeystorePassword: (unset) uniqueName: vcdb1221 user: c##delphix Operations delete update validateCredentials
- Using the update function, point the VDB at what is to be its new 12.2.0.1 Oracle Home.
dlpx6050.plb.internal sourceconfig 'vcdb1221'> update dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> set repository=OEL7SITDE2/ OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' OEL7SITDE2/Unstructured Files dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> set repository=OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> commit Dispatched job JOB-110 SOURCE_CONFIG_UPDATE job started for "vcdb1221". SOURCE_CONFIG_UPDATE job for "vcdb1221" completed successfully. dlpx6050.plb.internal sourceconfig 'vcdb1221'> ls Properties type: OracleSIConfig name: vcdb1221 cdbType: ROOT_CDB credentials: type: PasswordCredential password: ******** databaseName: vcdb1221 discovered: true environmentUser: OEL7SITDE2/delphix instance: type: OracleInstance instanceName: vcdb1221 instanceNumber: 1 linkingEnabled: true nonSysCredentials: (unset) nonSysUser: (unset) reference: ORACLE_SINGLE_CONFIG-3 repository: OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' services: 0: type: OracleService discovered: true jdbcConnectionString: jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.129)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=vcdb1221))) tdeKeystorePassword: (unset) uniqueName: vcdb1221 user: c##delphix Operations delete update validateCredentials
- Setting the container database, vcdb1221, to the 12.2.0.1 home has also set the release for the VPDB, vpdb1221, to 12.2.0.1.
dlpx6050.plb.internal sourceconfig 'vcdb1221'> cd .. dlpx6050.plb.internal sourceconfig> ls Objects NAME REPOSITORY LINKINGENABLED vcdb1221 OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' true db1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true PDB1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true vpdb1221 OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' true
- Select the container to perform the restore operation against.
dlpx6050.plb.internal> /selfservice container dlpx6050.plb.internal selfservice container> ls Objects NAME TEMPLATE NOTES ACTIVEBRANCH Oracle_Upgrade_Testing_Container Oracle_Upgrade_Testing_Template Oracle Upgrade Testing Container default Operations create listByTopOperationCount countByOwner dlpx6050.plb.internal selfservice container> select Oracle_Upgrade_Testing_Container dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'> ls Properties type: JSDataContainer name: Oracle_Upgrade_Testing_Container activeBranch: default firstOperation: HISTORY lastOperation: `JS_OPERATION-13/RECOVER lastUpdated: 2021-03-13T16:52:13.260Z lockUserName: (unset) lockUserReference: (unset) notes: Oracle Upgrade Testing Container operationCount: 7 properties: reference: JS_DATA_CONTAINER-1 state: ONLINE template: Oracle_Upgrade_Testing_Template Operations delete update refresh restore enable disable recover reset undo getActiveBranchAtTime addOwner removeOwner lock unlock dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'>
- Initiate the restore function.
dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'> restore dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> ls Properties type: JSDataContainerRestoreParameters forceOption: false timelinePointParameters: type: JSTimelinePointBookmarkInput bookmark: (required)
- Choose the appropriate bookmark.
dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set timelinePointParameters.bookmark=P Post19cUpgrade_Bookmark Pre19cUpgrade_Bookmark1 dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set timelinePointParameters.bookmark=Pre19cUpgrade_Bookmark1
- Set the force option to allow the Self Service Container restore operation to bypass the initial snapshot phase.
dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set forceOption=true dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> ls Properties type: JSDataContainerRestoreParameters forceOption: true (*) timelinePointParameters: type: JSTimelinePointBookmarkInput bookmark: Pre19cUpgrade_Bookmark1 (*)
- Initiate the restore.
dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> commit Dispatched job JOB-112 SELFSERVICE_USER_CONTAINER_RESTORE job started for "Oracle_Upgrade_Testing_Container". / SELFSERVICE_USER_CONTAINER_RESTORE job for "Oracle_Upgrade_Testing_Container" completed successfully. dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'>
- The GUI shows the restore has completed successfully
- The restore is successful.
- The VDB is seen as running and configured to run from a 12.2.0.1 Oracle Home.
- Oracle also shows the VDB is running from the lower 12.2.0.1 release.
[oracle@oel7sitde2 ~]$ ps -ef | grep pmon grid 3258 1 0 09:52 ? 00:00:01 asm_pmon_+ASM oracle 28331 1 0 16:06 ? 00:00:00 ora_pmon_db1221 oracle 29769 1 0 17:11 ? 00:00:00 ora_pmon_vcdb1221 oracle 31837 28149 0 17:15 pts/0 00:00:00 grep --color=auto pmon [oracle@oel7sitde2 ~]$ cat /etc/oratab .. # Multiple entries with the same $ORACLE_SID are not allowed. # # dbhome1:/u01/app/oracle/19.0.0/dbhome_1:N cdb19c1:/u01/app/oracle/19.0.0/dbhome_1:N # line added by Agent #db1221:/u01/app/oracle/product/12.2.0/dbhome_1:N # line added by Agent db1221:/u01/app/oracle/19.0.0/dbhome_1:N # line added by Agent +ASM:/u01/app/grid/19.0.0:N # line added by Agent [oracle@oel7sitde2 ~]$ . oraenv ORACLE_SID = [db1221] ? dbhome1 The Oracle base remains unchanged with value /u01/app/orabase [oracle@oel7sitde2 ~]$ export ORACLE_SID=vcdb1221 [oracle@oel7sitde2 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Sat Mar 13 17:18:18 2021 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> set lines 132 SQL> select instance_name,host_name,version from v$instance; INSTANCE_NAME HOST_NAME VERSION ---------------- ---------------------------------------------------------------- -------------- vcdb1221 oel7sitde2.plb.internal 12.2.0.1.0
Performing a CLI based Oracle version move from a lower release to a higher release
In this example the VDB version will move from the lower Oracle release, 12.2.0.1, to the higher release of Oracle, 19.3.0.0 through a Self Service bookmark captured at the higher Oracle release.
- Set the repository for the VDB at the CDB level to the desired Oracle Home and Oracle version in this case 19.3.0.0.
The sourceconfig for the VDB, vcdb1221 shows its Oracle Home is currently set to the 12c Oracle Home. It will be altered to the 19.3.0.0 home using the CLI steps detailed here.
dlpx6050.plb.internal selfservice container> /sourceconfig dlpx6050.plb.internal sourceconfig> ls Objects NAME REPOSITORY LINKINGENABLED vcdb1221 OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' true db1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true PDB1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true vpdb1221 OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' true Operations create dlpx6050.plb.internal sourceconfig> select vcdb1221 dlpx6050.plb.internal sourceconfig 'vcdb1221'> ls Properties type: OracleSIConfig name: vcdb1221 cdbType: ROOT_CDB credentials: type: PasswordCredential password: ******** databaseName: vcdb1221 discovered: true environmentUser: OEL7SITDE2/delphix instance: type: OracleInstance instanceName: vcdb1221 instanceNumber: 1 linkingEnabled: true nonSysCredentials: (unset) nonSysUser: (unset) reference: ORACLE_SINGLE_CONFIG-3 repository: OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' services: 0: type: OracleService discovered: true jdbcConnectionString: jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.129)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=vcdb1221))) tdeKeystorePassword: (unset) uniqueName: vcdb1221 user: c##delphix Operations delete update validateCredentials dlpx6050.plb.internal sourceconfig 'vcdb1221'> update dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> set repository=OEL7SITDE OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' OEL7SITDE1/'/u01/app/oracle/product/12.2.0/dbhome_1' OEL7SITDE1/Unstructured Files OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' OEL7SITDE2/Unstructured Files dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> set repository=OEL7SITDE2/ OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' OEL7SITDE2/'/u01/app/oracle/product/12.2.0/dbhome_1' OEL7SITDE2/Unstructured Files dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> set repository=OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' dlpx6050.plb.internal sourceconfig 'vcdb1221' update *> commit Dispatched job JOB-120 SOURCE_CONFIG_UPDATE job started for "vcdb1221". SOURCE_CONFIG_UPDATE job for "vcdb1221" completed successfully. dlpx6050.plb.internal sourceconfig 'vcdb1221'> cd .. dlpx6050.plb.internal sourceconfig> ls Objects NAME REPOSITORY LINKINGENABLED db1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true vcdb1221 OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' true PDB1221 OEL7SITDE1/'/u01/app/oracle/19.0.0/dbhome_1' true vpdb1221 OEL7SITDE2/'/u01/app/oracle/19.0.0/dbhome_1' true Operations create
- Using the Self Service CLI object, initiate the restore to the 19.3.0.0 Oracle release using the following steps.
dlpx6050.plb.internal sourceconfig> /selfservice container dlpx6050.plb.internal selfservice container> ls Objects NAME TEMPLATE NOTES ACTIVEBRANCH Oracle_Upgrade_Testing_Container Oracle_Upgrade_Testing_Template Oracle Upgrade Testing Container default Operations create listByTopOperationCount countByOwner dlpx6050.plb.internal selfservice container> select Oracle_Upgrade_Testing_Container dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'> ls Properties type: JSDataContainer name: Oracle_Upgrade_Testing_Container activeBranch: default firstOperation: HISTORY lastOperation: RESTORE lastUpdated: 2021-03-13T17:12:35.638Z lockUserName: (unset) lockUserReference: (unset) notes: Oracle Upgrade Testing Container operationCount: 8 properties: reference: JS_DATA_CONTAINER-1 state: ONLINE template: Oracle_Upgrade_Testing_Template Operations delete update refresh restore enable disable recover reset undo getActiveBranchAtTime addOwner removeOwner lock unlock dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container'> restore dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> ls Properties type: JSDataContainerRestoreParameters forceOption: false timelinePointParameters: type: JSTimelinePointBookmarkInput bookmark: (required) dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set timelinePointParameters.bookmark=P Post19cUpgrade_Bookmark Pre19cUpgrade_Bookmark1 dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set timelinePointParameters.bookmark=Post19cUpgrade_Bookmark dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> ls Properties type: JSDataContainerRestoreParameters forceOption: false timelinePointParameters: type: JSTimelinePointBookmarkInput bookmark: Post19cUpgrade_Bookmark (*) dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> set forceOption=true dlpx6050.plb.internal selfservice container 'Oracle_Upgrade_Testing_Container' restore *> commit Dispatched job JOB-122 SELFSERVICE_USER_CONTAINER_RESTORE job started for "Oracle_Upgrade_Testing_Container". - SELFSERVICE_USER_CONTAINER_RESTORE job for "Oracle_Upgrade_Testing_Container" completed successfully.
- The VDB is now seen running from a 19c Oracle Home.
The database is now seen running from the Oracle 19c (19.3.0.0) Oracle Home.
oracle@oel7sitde2 ~]$ cat /etc/oratab .. # Multiple entries with the same $ORACLE_SID are not allowed. # # dbhome1:/u01/app/oracle/19.0.0/dbhome_1:N cdb19c1:/u01/app/oracle/19.0.0/dbhome_1:N # line added by Agent #db1221:/u01/app/oracle/product/12.2.0/dbhome_1:N # line added by Agent db1221:/u01/app/oracle/19.0.0/dbhome_1:N # line added by Agent dbhome2:/u01/app/oracle/product/12.2.0/dbhome_1:N # line added by Agent +ASM:/u01/app/grid/19.0.0:N # line added by Agent [oracle@oel7sitde2 ~]$ . oraenv ORACLE_SID = [vcdb1221] ? db1221 The Oracle base has been changed from /u01/app/oracle to /u01/app/orabase [oracle@oel7sitde2 ~]$ ps -ef | grep pmon grid 3258 1 0 09:52 ? 00:00:01 asm_pmon_+ASM oracle 8751 1 0 17:37 ? 00:00:00 ora_pmon_vcdb1221 oracle 11944 28149 0 17:55 pts/0 00:00:00 grep --color=auto pmon oracle 28331 1 0 16:06 ? 00:00:00 ora_pmon_db1221 [oracle@oel7sitde2 ~]$ export ORACLE_SID=vcdb1221 [oracle@oel7sitde2 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 13 17:55:48 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> set lines 132 SQL> select instance_name,host_name,version from v$instance; INSTANCE_NAME HOST_NAME VERSION ---------------- ---------------------------------------------------------------- --------------- vcdb1221 oel7sitde2.plb.internal 19.0.0.0.0 SQL>
Related Articles
The following articles may provide more information or related information to this article: