Migrating Oracle workloads from on-premises environments to Oracle Autonomous Database on Azure (ADB@Azure) can be achieved with near-zero downtime using Oracle Zero Downtime Migration (ZDM) and Oracle GoldenGate (OGG).
This guide provides a streamlined step-by-step approach covering source preparation, GoldenGate setup, ZDM configuration, and migration execution.
1. Architecture Overview
The migration setup consists of:
- Source Database (On-Prem Oracle DB)
- GoldenGate Hub VM
- ZDM Server
- ADB@Azure Target Database
- NFS Storage for Data Pump transfer
Migration Flow
- Prepare source database
- Configure GoldenGate replication
- Prepare ADB@Azure target
- Configure GoldenGate VM
- Configure ZDM server
- Run ZDM evaluation
- Execute online logical migration
- Monitor GoldenGate lag
- Perform cutover
2. Source Database Preparation
ZDM Requirements
Create SSH Connectivity
- Add Oracle user to required OS group
- Generate SSH key pair for Oracle user
- Copy private key to ZDM server
ssh-keygen -t rsa
Example private key:
id_rsa
Database Parameter Configuration
Run the following SQL statements:
alter system set PGA_AGGREGATE_LIMIT=0 scope=both sid='*';
grant exempt access policy to SYSTEM;
alter system set streams_pool_size=2G scope=both;
alter system set global_names=false;
3. Enable GoldenGate Requirements
Enable ARCHIVELOG Mode
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
select log_mode from v$database;
Enable FORCE LOGGING
alter database force logging;
select force_logging from v$database;
Enable Supplemental Logging
select minimal from dba_supplemental_logging;
alter database add supplemental log data;
select minimal from dba_supplemental_logging;
Enable GoldenGate Replication
alter system set ENABLE_GOLDENGATE_REPLICATION=TRUE scope=both;
Create GGADMIN User
create user ggadmin identified by ******** default tablespace users temporary tablespace temp;
grant connect, resource to ggadmin;
grant unlimited tablespace to ggadmin;
alter user ggadmin quota 10G on users;
grant select any dictionary to ggadmin;
grant create view to ggadmin;
grant execute on dbms_lock to ggadmin;
exec dbms_goldengate_auth.GRANT_ADMIN_PRIVILEGE('ggadmin');
grant execute on DBMS_SCHEDULER to ggadmin;
grant select any sequence to ggadmin;
grant alter system to ggadmin;
grant alter database to ggadmin;
grant logmining to ggadmin;
4. Target ADB@Azure Preparation
Recommended Actions
- Disable auto maintenance jobs
- Scale up ECPU temporarily for migration
- Create GGADMIN user
- Apply GoldenGate grants
Example:
CREATE USER ggadmin IDENTIFIED BY <password>;
GRANT CONNECT, RESOURCE TO ggadmin;
GRANT CREATE SESSION, ALTER SESSION TO ggadmin;
GRANT SELECT ANY DICTIONARY TO ggadmin;
GRANT FLASHBACK ANY TABLE TO ggadmin;
GRANT LOGMINING TO ggadmin;
5. GoldenGate VM Setup
Infrastructure Requirements
- NFS mounted
- Sufficient CPU / Memory / Disk
- Docker Engine installed
- GoldenGate container image downloaded from OCI Marketplace
Install Docker
Since internet access may be restricted in secured environments:
- Download Docker RPM manually
- Upload RPM to VM
- Install RPM
yum install docker-engine.rpm
Start Docker:
sudo systemctl enable --now docker
sudo systemctl status docker
docker info
Load GoldenGate Docker Image
docker load < ./ora23ai-2113000.tar
docker image list
Disable IPv6 in NGINX (Required in Restricted Environments)
Inside container:
docker run -it --entrypoint=/bin/bash <goldengate-image>
1: docker run -it --entrypoint=/bin/bash <your-goldengate-image>
docker run -it --entrypoint=/bin/bash docker.io/localhost/oracle/goldengate:23.9.0.25.07
2: Locate and edit the relevant NGINX configuration file:
vi /etc/nginx/conf.d/ogg.conf
3: In the `server` block for HTTPS (port 443), comment out or remove lines that specify IPv6 bindings, such as:
```
# listen [::]:443 ssl;
```
Leave the IPv4 equivalent intact (e.g., `listen 443 ssl;`). If there's a similar line for port 80, handle it the same way if needed.
4: Exit the container
5: For persistence across container restarts (recommended), extract the modified config file using `docker cp <container-id>:/etc/nginx/conf.d/ogg.conf ./local-ogg.conf`, then run the container with a volume mount:
(ex : :docker cp 631d0f4a2e72://etc/nginx/nginx.conf /appdata/goldengate/nginx_new.conf
nohup docker run --name ogg2390 -p 443:443 -v /appdata/goldengate/nginx_new.conf:/etc/nginx/nginx.conf docker.io/localhost/oracle/goldengate:23.9.0.25.07 &
Edit:
vi /etc/nginx/conf.d/ogg.conf
Comment IPv6 entries:
# listen [::]:443 ssl;
Persist configuration using volume mounts.
Change Docker Root Directory(Optional)
By default Docker uses /var/lib/docker, which may have limited storage.
Move Docker Data
systemctl stop docker
rsync -aP /var/lib/docker /appdata/gg_docker
Update:
vi /etc/docker/daemon.json
{
"data-root":"/appdata/gg_docker/docker"
}
Restart Docker:
systemctl start docker
docker info | grep "Docker Root Dir"
6. Configure ADB Wallet inside GoldenGate
Copy wallet ZIP into container:
mv Wallet_xxx.zip /home/ogg/
Unzip wallet:
mkdir /u02/Deployment/etc/adb
unzip Wallet_xxx.zip
Update sqlnet.ora:
DIRECTORY="/u02/Deployment/etc/adb"
Update /etc/hosts with:
- ADB hostname
- Source DB hostname
- ZDM server hostname
7. ZDM Server Setup
Prerequisites
- Create
zdmuser - Install ZDM 21c or later
- Mount NFS storage
- Configure environment variables
export ZDMHOME=/home/zdmuser/zdmhome
export ZDMBASE=/home/zdmuser/zdmbase
Create Migration Workspace
mkdir /home/zdmuser/logical_online_adb_nfs
Create response file:
vi logical_online_adb_nfs.rsp
8. Configure ZDM Response File
Key parameters:
MIGRATION_METHOD=ONLINE_LOGICAL
DATA_TRANSFER_MEDIUM=NFS
Data Pump Configuration
DATAPUMPSETTINGS_JOBMODE=SCHEMA
DATAPUMPSETTINGS_DATAPUMPPARAMETERS_EXPORTPARALLELISMDEGREE=12
DATAPUMPSETTINGS_DATAPUMPPARAMETERS_IMPORTPARALLELISMDEGREE=18
Source Database
SOURCEDATABASE_CONNECTIONDETAILS_HOST=<source-host>
SOURCEDATABASE_ADMINUSERNAME=SYSTEM
SOURCEDATABASE_GGADMINUSERNAME=ggadmin
Target Database
TARGETDATABASE_ADMINUSERNAME=ADMIN
TARGETDATABASE_GGADMINUSERNAME=ggadmin
GoldenGate Hub
GOLDENGATEHUB_URL=https://<goldengate-vm-ip>
GOLDENGATEHUB_ALLOWSELFSIGNEDCERTIFICATE=TRUE
Wallet Configuration
TARGETDATABASE_CONNECTIONDETAILS_TLSDETAILS_CREDENTIALSLOCATION=/home/zdmuser/wallet
9. Run ZDM Evaluation
Before executing migration, validate configuration.
$ZDMHOME/bin/zdmcli migrate database \
-rsp logical_online_adb_nfs.rsp \
-skipadvisor \
-sourcenode <source-node> \
-sourcesid <source-sid> \
-srcauth dbuser \
-srcarg1 user:oracle \
-srcarg2 identity_file:/path/id_rsa \
-eval
10. Execute Online Migration
Once evaluation succeeds:
$ZDMHOME/bin/zdmcli migrate database \
-rsp logical_online_adb_nfs.rsp \
-skipadvisor \
-sourcenode <source-node> \
-sourcesid <source-sid> \
-srcauth dbuser \
-srcarg1 user:oracle \
-srcarg2 identity_file:/path/id_rsa \
-pauseafter ZDM_MONITOR_GG_LAG
11. Migration Activities Automated by ZDM
ZDM automatically performs:
- GoldenGate Extract creation
- Replicat configuration
- Data Pump export/import
- Initial load
- Continuous replication
- Lag monitoring
- Cutover orchestration
12. Monitor Migration Progress
Query migration jobs:
$ZDMHOME/bin/zdmcli query job -jobid <jobid>
Monitor:
- GoldenGate lag
- Extract status
- Replicat status
- Data Pump completion
- Target synchronization
13. Best Practices
Performance Recommendations
- Scale up ADB ECPU during migration
- Use high parallelism for Data Pump
- Ensure adequate disk space for trail files
- Keep NFS throughput optimized
Operational Recommendations
- Validate supplemental logging before start
- Test wallet connectivity independently
- Monitor GoldenGate lag continuously
- Keep rollback strategy ready until cutover
Conclusion
Using Oracle ZDM with GoldenGate provides a robust and near-zero downtime approach for migrating on-premises Oracle databases to ADB@Azure.
The combination of:
- ZDM automation
- GoldenGate replication
- Data Pump parallelism
- Autonomous Database scalability
ensures a reliable, scalable, and operationally efficient migration process.
The above steps are not limited to Oracle ADB@Azure but can also be used in other multicloud environments like AWS and GCP.
