Establish the Communication Paths

Establish communication paths with the ZDM service to communicate with the source and target databases and SSH connections between source and target databases.

Set Up Communication

Establish communication between the source and target databases and create SSH keys for the ZDM service to communicate with the source and target databases.

To simplify management, we'll reuse the ZDM service tool public key locally and add it to both the source and target hosts.

If the target database is an Oracle Real Application Clusters (RAC) database, then password-less SSH connectivity must be setup between the RAC nodes for the oracle user.

  1. Create an SSH key for the ZDM host.
    Use the default prompts and do not use a passphrase.
    ssh-keygen
    Two files are created: id_rsa and id_rsa.pub.
  2. Make a copy of the private key.
    cp ~/.ssh/id_rsa ~/.ssh/zdm_service_tool.ppk
  3. Edit the script with the proper IP addresses for the bastion hosts and DB hosts on the source and target. If you have access to the source and target databases from your local machine, then reuse the ZDM service tool public key locally and add it to both the source and target hosts.
    # exit out of the zdmuser shell 
    exit
    # copy the public key to the opc user for download
    sudo cp /home/zdmuser/.ssh/id_rsa.pub /home/opc
    # exit the opc user shell, back to local host
    exit
    # copy the public key to the source and target hosts into authorized_keys file 
    ZDM_SERVICE_IP=ZDM_Service_IP_Address
    SOURCE_DB_IP=
    SOURCE_DB_BASTION=
    TARGET_DB_IP=Target_DB_IP_Address
    TARGET_DB_BASTION=
    ZDM_USER=opc
    SOURCE_USER=opc
    TARGET_USER=opc
    ssh ${ZDM_USER}@${ZDM_SERVICE_IP} 'cat /home/zdmuser/.ssh/id_rsa.pub' | ssh -J 
    ${SOURCE_USER}@${SOURCE_DB_BASTION} ${SOURCE_USER}@${SOURCE_DB_IP} 'cat >>
     ~/.ssh/authorized_keys'
    ssh ${ZDM_USER}@${ZDM_SERVICE_IP} 'cat /home/zdmuser/.ssh /id_rsa.pub' | ssh -J
    ${TARGET_USER}@${TARGET_DB_BASTION} ${TARGET_USER}@${TARGET_DB_IP} 'cat >>
    ~/.ssh/authorized_keys'
  4. If you don't have access to the source and target databases from your local machine, then copy the public key over to the hosts as the authorized keys.
    cat id_rsa.pub >> ~/.ssh/ authorized_keys
  5. Verify that the zdmuser has SSH access to the source database from the ZDM service host.
    ssh -i ~/.ssh/zdm_service_tool.ppk opc@target_ip_address
  6. Verify that the zdmuser has SSH access to the target database from the ZDM service host.
    ssh -i ~/.ssh/zdm_service_tool.ppk opc@source_ip_address
  7. As a root user, include the source and target host name lookup to the zdm service hosts file.
    Use the fully qualified domain name (FQDN).
    # exit zdmuser shell
    exit
    # get root access
    sudo su -
    echo source_db_ip source_FQDN source_hostname >> /etc/hosts
    echo target_db_ip target_FQDN target_hostname >> /etc/hosts
  8. Include the source host name lookup to the target hosts file.
    Enter values for the following: source_db_ip sourcetarget_db_ip target_FQDN target_hostname, target_db_ip target_scan_FQDN target-scan_hostname, target_db_ipsource_db_ip source_FQDN source_hostname, and source_db_ip source_scan_FQDN source-scan_hostname.
    # exit zdmuser shell
    exit
    # ssh command to source host
    ssh opc@source_db_ip 'echo target_db_ip target_FQDN target_hostname >> /etc/hosts'
    ssh opc@source_db_ip 'echo target_db_ip target_scan_FQDN target-scan_hostname >> /etc/hosts'
    # ssh command to target host
    ssh opc@target_db_ip 'echo source_db_ip source_FQDN source_hostname >> /etc/hosts'
    ssh opc@target_db_ip 'echo source_db_ip source_scan_FQDN source-scan_hostname >> /etc/hosts'

Test the Connectivity

Test the communication between the source and target database systems over port 1521.

  1. On the source database server, test the connectivity from the source database server to the target database system over port 1521.
    tnsping FQDN_source:1521
  2. On the target database server, test the connectivity from the target database system to the source database server over port 1521.
    tnsping FQDN_target:1521