Skip to main content

Command Palette

Search for a command to run...

Mastering Oracle Zero Downtime Migration (ZDM): A Complete Guide

Published
7 min read
Mastering Oracle Zero Downtime Migration (ZDM): A Complete Guide
R
I’m Robert Moayedzadeh, a seasoned Oracle Database Administrator based in Atlanta, Georgia. With years of hands-on experience managing complex Oracle environments — from RAC and Exadata to large-scale cloud migrations — I’ve helped organizations move critical workloads to OCI with minimal downtime and maximum performance. Through DBA Dispatch, I share practical insights, battle-tested strategies, and no-fluff guidance on Oracle performance tuning, Zero Downtime Migration (ZDM), GoldenGate, Autonomous Database, and everything in between. If you’re a DBA navigating the shift to the cloud, you’re in the right place.

"Successful migrations are less about the tool and more about planning — network readiness, storage performance, and fallback strategy. Tools like ZDM and GoldenGate are just implementations of that strategy."


What is Oracle ZDM?

Oracle Zero Downtime Migration (ZDM) is an orchestration layer that automates database migrations with minimal — or zero — downtime. It primarily leverages Data Guard for physical migrations or logical methods when needed, and is especially well-suited for OCI and Exadata environments.

ZDM standardizes the migration process and dramatically reduces the risk of manual error, making it the go-to choice for large enterprise migrations.


Installation Guide

Prerequisites

Before installing ZDM, ensure your environment meets the following requirements:

Requirement Details
Operating System Oracle Linux 7 or 8
Swap Space 2 GB recommended
Required Packages libnsl, ncurses-compat-libs, glibc-devel, expect, unzip, ksh, libaio, libaio-devel, elfutils-libelf, elfutils-libelf-devel

ZDM must be installed on a dedicated host with network connectivity to both source and target databases.


Step 1: Run the Installer

./zdminstall.sh setup \
  oraclehome=/u01/app/zdm/zdm_home \
  oraclebase=/u01/app/zdm/zdm_base \
  ziploc=/u01/app/zdm/zdm21.5.2/zdm_home.zip

Step 2: Configure Your Environment

export ZDM_HOME=/u01/app/zdm/zdm_home
export PATH=\(ZDM_HOME/bin:\)PATH

Step 3: Verify the Installation

zdmcli -build

Step 4: Start the ZDM Service

zdmservice start
zdmservice status

Step 5: Configure Passwordless SSH

ZDM requires passwordless SSH access between the ZDM host and both the source and target nodes.

ssh-keygen -t rsa
ssh-copy-id oracle@source
ssh-copy-id oracle@target

Step 6: Validate the Environment

Before running a migration, always validate connectivity and readiness:

zdmcli validate all \
  -sourcedb <db> \
  -targetnode <host> \
  -srcauth oracle \
  -tgtauth oracle

Choosing the Right Migration Method

Not all migrations are created equal. The right tool depends on four key dimensions:

Factor What to Evaluate
Downtime tolerance Drives whether to use physical vs. logical replication
Database size Large datasets favor RMAN or Transportable Tablespaces (TTS)
Platform compatibility Cross-platform migrations may require logical methods
Network constraints Limited bandwidth or firewalls may require staged backups or cascading Data Guard

Decision Framework

Scenario Recommended Method
Downtime must be minutes ZDM with Data Guard
Zero downtime required GoldenGate
30TB+ warehouse with maintenance window RMAN or TTS
Restricted ports or firewalls Object Storage staging or Cascading Data Guard
Small/schema-level migration Data Pump (expdp/impdp)

Pro tip: Always factor in your fallback strategy. Data Guard provides the safest rollback option of any method.


How ZDM Works Under the Hood

Here's the full ZDM configuration and execution flow:

1. Deploy the ZDM Host

Set up a dedicated ZDM host with SSH connectivity to both source and target environments.

2. Configure Passwordless SSH

Establish bidirectional, passwordless SSH between all relevant nodes.

3. Prepare the Response File

The response file is the heart of every ZDM migration. It defines:

  • Source and target database details

  • Credentials

  • Migration type (physical or logical)

  • Storage configuration

4. Run ZDM Prechecks

ZDM validates version compatibility, network connectivity, and storage readiness before any data moves.

5. ZDM Executes the Migration

Once prechecks pass, ZDM:

  1. Uses RMAN to build a standby database

  2. Configures Data Guard

  3. Synchronizes redo logs

  4. Executes the switchover


Common Migration Challenges

Most migration issues aren't database problems — they're infrastructure problems. Here's what to watch for:

🔹 Networking Issues

  • Firewall rules blocking redo transport (TCP 1521 or custom ports)

  • Latency impacting Data Guard sync performance

  • DNS/SCAN misconfiguration in RAC environments

🔹 Storage Issues

  • Incorrect OCI storage setup (block vs. object storage)

  • Insufficient IOPS for redo apply

  • Permission misconfigurations

🔹 Configuration Issues

  • Errors in the ZDM response file

  • Credential or wallet misconfiguration

Real-World Example

In one migration, direct connectivity wasn't allowed due to security policies. The solution was implementing Cascading Data Guard — routing redo through an intermediate node to bypass firewall restrictions entirely.

Best Practices Checklist

  • ✅ Always run ZDM prechecks before starting

  • ✅ Validate network throughput with iperf

  • ✅ Test RMAN restore before cutover

  • ✅ Define and document your rollback strategy


Handling Special Scenarios

Hybrid Data Guard

Hybrid Data Guard refers to a configuration where the standby is hosted in the cloud (with encryption or cloud-specific features enabled) while the source remains on-premises.

This is commonly used when:

  • The target must meet encryption or compliance requirements

  • The source environment doesn't yet have those controls

It's essentially extending Data Guard across hybrid infrastructure while adapting to cloud security standards.

Firewall Restrictions

Network constraints should be treated as a design input, not a blocker. Options include:

Option Use Case
Cascading Data Guard Route redo through an intermediate host
RMAN backup to Object Storage Avoid direct connectivity entirely
GoldenGate over allowed ports When logical replication is acceptable

Small vs. Large Databases

Small databases:

  • Use Data Pump (expdp/impdp)

  • Faster, simpler, minimal overhead

Large databases:

  • RMAN backup/restore — reliable and scalable

  • ZDM with Data Guard — minimal downtime

  • Transportable Tablespaces (TTS) — fastest when platform-compatible


RAC & ASM: What You Need to Know

RAC Networking Architecture

RAC networking is configured at the Grid Infrastructure layer and includes:

Component Purpose
SCAN Listeners Load balancing across nodes
VIPs (Virtual IPs) Failover support
Private Interconnect Node-to-node communication

DNS is critical for SCAN resolution — misconfiguration here can cause connection or failover failures.

Essential RAC & ASM Commands

# Cluster & Database Status
srvctl status database
srvctl config database
srvctl start instance -d <db> -i <instance>
srvctl stop instance -d <db> -i <instance>

# Cluster Resource Status
crsctl stat res -t
crsctl check cluster

# ASM Disk & File Management
asmcmd lsdg       # List disk groups
asmcmd ls         # List files
asmcmd lsdsk      # List disks

Tip: Use srvctl to manage services and instances during failover scenarios.


RMAN's Role in Migrations

RMAN is foundational to virtually every physical migration strategy:

During Migration:

  • Creates backups or duplicates databases

  • Builds the standby database in Data Guard / ZDM workflows

  • Stages backups in Object Storage for OCI migrations

For Validation:

  • Backup integrity checks

  • Restore testing before cutover

For large databases, RMAN is often the most reliable migration method available.


Key Takeaways

  • ZDM is your best tool for OCI/Exadata migrations when minimal downtime is required

  • GoldenGate is the choice for true zero-downtime or heterogeneous targets

  • Infrastructure planning (network, storage, SSH, DNS) often determines migration success more than the tool itself

  • Prechecks and fallback strategies are non-negotiable in production migrations

  • Cascading Data Guard and Object Storage staging are powerful solutions for restricted network environments


This guide is based on Oracle ZDM 21.5.2. Always refer to the official Oracle documentation for the latest supported configurations.

6 views