Migrate your
on-premises Database to Oracle Cloud Infrastructure Database System
Part 3: Zero Downtime
Migration (Installation)
Author: Donatien MBADI OUM, Consultant
1.
Introduction
Oracle Zero Downtime Migration (ZDM)
is an Oracle’s premier solution for a simplified and automated database migration
solution. ZDM is known as Oracle Maximum Availability Architecture (MAA)
recommended as solution to migrate Oracle Database to and between any Oracle infrastructures,
including Exadata Database Machine, Exadata Cloud at Customer or Oracle Cloud
Virtual Machine. ZDM is free and supports Data Pump, RMAN, Data Guard and
GoldenGate. It offers four different migration methods:
-
Logical Online Migration using GoldenGate
-
Logical Offline Migration using Data Pump
-
Physical Online Migration using Data Guard
-
Physical Offline Migration using RMAN
Oracle Zero Downtime Migration Supported Sources and Targets
Oracle ZDM supports source comprise of
Oracle Databases on-premises, on Oracle Cloud Infrastructure (OCI) and Oracle
AWS RDS Databases. The current version of ZDM, 21c (21.3 in October 2022) supports
11g (11.2.0.4) and later versions as source database. The Database configuration
can be Single Instance, RAC One Node or RAC. RAC stands for Real Application
Cluster. ZDM can handle the conversion of a non-CDB source database to a PDB of
the same version as part of the physical migration process.
2.
Installation of ZDM software
2.1.Download ZDM
Download the ZDM software version 21.3
(V1019875-01.zip) from Oracle site.
2.2.Create ZDM Compute instance
We will build a dedicated host for the
ZDM software installation. This host is referred as ZDM Service Host named zdmhost running on Oracle Linux 7.9. The
ZDM software can be:
-
Installed manually on-premises
-
Installed manually on OCI
-
Use the Oracle Database Migration Tools Image where ZDM and
other tools are already installed.
In this article, we will manually
install ZDM software on OCI.
a.
Connect to your OCI Console and click on Compute and then
Instances
b.
Choose the compartment and Click on Create instance. If you
want to use a new compartment, then create it first.
c.
Choose Oracle Linux 7.9 as image (certified image)
d.
Choose your Networking (VCN, Subnet…)
e.
Add your SSH Key
f.
Specify a custom boot volume size and put 200 GB as the boot
volume. The system required 100 GB of free space
Click Create. After a few minutes, you will be able to log in the compute instance. In our case, the public Ip address is 132.145.101.196.
2.3. ZDM installation
a.
Log in to the ZDM host using SSH
$ssh -i .\id_rsa opc@132.145.101.196
b.
Extend the file system to make 200 GB available. This can be
done as root user
#/usr/libexec/oci-growfs
–y
..
c.
Create zdm group, user and directories. This should be done as
root user
#groupadd zdm
#useradd -g zdm zdmuser
#mkdir -p /home/zdmuser/zdminstall
#mkdir /home/zdmuser/zdmhome
#mkdir /home/zdmuser/zdmbase
#chown -R zdmuser:zdm /home/zdmuser/
d.
Install the required packages used by zdm
#yum install glibc-devel expect unzip libaio
oraclelinux-developer-release-el7 -y
…
…
e.
Copy the ZDM software zip file to the ZDM host
f.
Add ZDMBASE and ZDMHOME to .bash_profile as zdmuser
$. .bash_profile
g.
Unzip the ZDM software as zdmuser
h.
Install the ZDM software as zdmuser
$
/home/zdmuser/zdminstall/zdm21.3/zdminstall.sh setup oraclehome=$ZDMHOME
oraclebase=$ZDMBASE ziploc=/home/zdmuser/zdminstall/zdm21.3/zdm_home.zip
–
zdm
...
…
i.
Start ZDM service
$ZDMHOME/bin/zdmservice
start
…
…
j.
Check ZDM service
$ZDMHOME/bin/zdmservice
status
2.4.ZDM post installation
Now we have ZDM installed. There are a
few post installation tasks that should be done before move forward with Oracle
Golden Gate configuration.
a.
Create SSH key pair for zdmuser
$ssh-keygen
Keep the defaults
b.
Generate an API Signing Key
o Create an .oci directory to store the
credentials
$
mkdir
~/.oci
o Generate the private key
$
openssl genrsa -out ~/.oci/oci_api_key.pem 2048
o Change de permission to ensure that
only you can read the private key file
o Generate the public key from your new
private key
$
openssl rsa -pubout -
in
~/.oci/oci_api_key.pem
-out ~/.oci/oci_api_key_public.pem
o
You can view the content that you will upload
c.
Upload the PEM public key in the console.
o From the Cloud console, Click on your
profile
o Click API Keys under Resources and Add
API Key
o Choose Paste Public Key option and
paste the PEM public key, then Close
The key’s fingerprint
will be diplayed in the console. You will use it later.
d.
Install OCI CLI (This is optional) as zdmuser
$
bash
-c
"$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
…
…
e.
Configure OCI CLI as zdmuser
$oci setup config
…
…
f.
Check the CLI configuration by creating and Object Storage
bucket
$COMPARTMENT_OCID=ocid1.compartment.oc1..aaaaaaaanql7unbghpcstdqheemyghyi3z6ymxqkpv5uxzvg4t3zqdx66spa
$
oci os bucket create --compartment-
id
$COMPARTMENT_OCID
--name zdmbucket
g.
Check on OCI Console the Object Storage bucket is created