Oracle Zero Downtime Migration (ZDM) is the free-to-use Oracle Maximum Availability Architecture (MAA)-recommended solution to migrate Oracle Databases to the Oracle Cloud Infrastructure.ZDM provides a number of migration options – Physical offline,Physical online, Logical offline, Logical online.
In a Logical Online migration, users are still connected to a live database while ZDM is executing in the background. Internally ZDM uses Oracle GoldenGate technology to enable the ‘zero-downtime’ migration as well as Oracle Data Pump.These series of posts provide a step-by-step procedure of how to do an Online Logical Migration of an Oracle Database 12c to Oracle Database 21c.
In Part 1, we discussed how to create and configure the ZDM hub.
In Part 2, we discussed how to create and configure the GoldenGate hub.
In Part 3, we discussed the process of configuring connectivity from the OCI console to both the ZDM and GoldenGate hubs.
In this post, we will configure the source Oracle 12c Release 2 database and the target Oracle 21c database for Zero Downtime Migration.
Source (Oracle 12c Release 2)
Create the GoldenGate user and grant required privileges.
[oracle@ora12c ~]$ sqlplus system/xxxxxx@10.0.0.50:1521/ora12c_pdb1.sub12020731300.soormavcn.oraclevcn.com
SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 7 04:10:00 2023
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Last Successful login time: Tue Feb 07 2023 01:08:49 +00:00
Connected to:
Oracle Database 12c EE High Perf Release 12.2.0.1.0 - 64bit Production
SQL> show con_name
CON_NAME
------------------------------
ORA12C_PDB1
SQL> SHOW CON_NAME
CON_NAME
------------------------------
ORA12C_PDB1
SQL> create user ggadmin identified by DreamLiner787## default tablespace users temporary tablespace temp;
User created.
SQL> grant connect, resource to ggadmin;
Grant succeeded.
SQL> grant unlimited tablespace to ggadmin;
Grant succeeded.
SQL> grant select any dictionary to ggadmin;
Grant succeeded.
SQL> grant create view to ggadmin;
Grant succeeded.
SQL> grant execute on dbms_lock to ggadmin;
Grant succeeded.
SQL> exec dbms_goldengate_auth.GRANT_ADMIN_PRIVILEGE('ggadmin');
PL/SQL procedure successfully completed.
SQL> grant insert any table, update any table, delete any table to ggadmin;
Grant succeeded.
Target (Oracle 21c)
Create the GoldenGate user and grant required privileges.
[oracle@ora21c ~]$ sqlplus system/xxxxxxxx@10.0.0.234:1521/ora21c_pdb1.sub12020731300.soormavcn.oraclevcn.com
SQL*Plus: Release 21.0.0.0.0 - Production on Tue Feb 7 04:31:45 2023
Version 21.8.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Last Successful login time: Mon Feb 06 2023 07:33:07 +00:00
Connected to:
Oracle Database 21c EE High Perf Release 21.0.0.0.0 - Production
Version 21.8.0.0.0
SQL> show con_name
CON_NAME
------------------------------
ORA21C_PDB1
SQL> create user ggadmin identified by DreamLiner787## default tablespace users temporary tablespace temp;
User created.
SQL> grant connect, resource to ggadmin;
Grant succeeded.
SQL> grant unlimited tablespace to ggadmin;
Grant succeeded.
SQL> grant select any dictionary to ggadmin;
Grant succeeded.
SQL> grant create view to ggadmin;
Grant succeeded.
SQL> grant execute on dbms_lock to ggadmin;
Grant succeeded.
SQL> exec dbms_goldengate_auth.GRANT_ADMIN_PRIVILEGE('ggadmin');
PL/SQL procedure successfully completed.
SQL> grant insert any table, update any table, delete any table to ggadmin;
Grant succeeded.
SQL> quit
Disconnected from Oracle Database 21c EE High Perf Release 21.0.0.0.0 - Production
Version 21.8.0.0.0
Source (Oracle 12c Release 2)
Create the directory for Data Pump Export.
[oracle@ora12c oracle]$ pwd /u01/app/oracle [oracle@ora12c oracle]$ mkdir zdm_export [oracle@ora12c oracle]$ sqlplus sys as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 7 07:42:33 2023 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 12c EE High Perf Release 12.2.0.1.0 - 64bit Production SQL> alter session set container=ORA12C_PDB1; Session altered. SQL> create directory zdm_export as '/u01/app/oracle/zdm_export'; Directory created.
Target (Oracle 21c)
Create the directory for Data Pump Import.
[oracle@ora21c ~]$ cd /u01/app/oracle/
[oracle@ora21c oracle]$ mkdir zdm_import
[oracle@ora21c oracle]$ sqlplus sys as sysdba
SQL*Plus: Release 21.0.0.0.0 - Production on Tue Feb 7 07:44:54 2023
Version 21.8.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 21c EE High Perf Release 21.0.0.0.0 - Production
Version 21.8.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORA21C_PDB1 READ WRITE NO
SQL> alter session set container=ORA21C_PDB1;
Session altered.
SQL> create directory zdm_import as '/u01/app/oracle/zdm_import';
Directory created.
Source (Oracle 12c Release 2)
Create the DEMO user and the sample tables.
[oracle@ora12c ~]$ sqlplus system/xxxxxx@10.0.0.50:1521/ora12c_pdb1.sub12020731300.soormavcn.oraclevcn.com SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 7 04:10:00 2023 Copyright (c) 1982, 2016, Oracle. All rights reserved. Last Successful login time: Tue Feb 07 2023 01:08:49 +00:00 Connected to: Oracle Database 12c EE High Perf Release 12.2.0.1.0 - 64bit Production SQL> alter session set container=ORA12C_PDB1; Session altered. SQL> create user demo identified by DreamLiner787##; User created. SQL> grant dba to demo; Grant succeeded. SQL> create table demo.myobjects as select * from dba_objects; Table created. SQL> create table demo.mytables as select * from dba_tables; Table created. SQL> create table demo.myindexes as select * from dba_indexes; Table created.
Create the OCI Storage Bucket.




Test the OCI Storage Bucket by uploading a file and then listing the contents of the storage bucket.
[zdmuser@zdm-hub .ssh]$ echo abc > /tmp/abc.txt [zdmuser@zdm-hub .ssh]$ oci os object put --file /tmp/abc.txt --namespace sdk0bdtnrmys --bucket-name MIG21C [zdmuser@zdm-hub .ssh]$ oci os object list --bucket-name MIG21C
Generate the Auth Token via the OCI console.

Click on Generate Token.

Make a note of the generated authentication token and take a copy. We will need this information when we run the zdmcli command at a later stage.