Prepare the Databases for Migration

Ensure that the source and target database prerequisites are met, the encryption wallet is available, and the Oracle Cloud Infrastructure Object Storage bucket is available and accessible.

Prepare the Source Database Server

Verify that the source database meets the Zero Downtime Migration prerequisites.

  1. Verify that port 22 on the source database server allows incoming connections from the Zero Downtime Migration service host.
  2. Verify that the scan listener port 1521 on the source database server allows incoming connections from the target database server.
  3. Verify that the source database is running in archive log mode.

Create a Wallet on the Source Database

Create a wallet on the source database and save the public key. The wallet is used to encrypt the backup and is needed to decrypt the backup on the target database.

  1. Log into the source database system as the oracle user.
  2. Create the folders for the wallet if they are not present
    sudo mkdir -p /opt/oracle/dcs/commonstore/wallets/tde/ORCL
    sudo chown -R oracle:oinstall /opt/oracle/dcs
  3. Set the encryption wallet location in the $ORACLE_HOME/network/admin/sqlnet.ora file by adding the following lines:
    ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)
            (METHOD_DATA=(DIRECTORY=/opt/oracle/dcs/commonstore/wallets/tde/ORCL/)))
  4. Create the wallet with SQLPlus, as the sysdba user.
    sqlplus "/as sysdba" 
    > ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/opt/oracle/dcs/commonstore/wallets/tde/ORCL/'identified by
            w6KP47FS3sggA5CAsG; 
    > ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY password container = ALL;
    > ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY password with backup container = ALL; 
    > select * FROM v$encryption_keys;
  5. Verify that the wallet status is open and that the wallet type is auto login.
    When source and target databases are Transparent Data Encryption (TDE) enabled, the wallet status on both the source and target databases must be OPEN and the WALLET_TYPE must be AUTOLOGIN.
    sqlplus / as sysdba
    SQL> SELECT * FROM v$encryption_wallet;
  6. If the wallet type isn't auto login, then set up auto login.
    
    SQL> SELECT * FROM v$encryption_wallet; 
    > ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE
    '/opt/oracle/dcs/commonstore/wallets/tde/ORCL/' IDENTIFIED BY password; 
    > administer key management set keystore close identified by password;

Prepare the Target Database System

Verify that the source database meets the Zero Downtime Migration prerequisites.

  1. Verify that port 22 on the target database system is open to allow incoming connections from the Zero Downtime Migration service host.
  2. Verify that the scan listener port 1521 on the target database system is open to allow incoming connections from the source database server.
  3. Verify that the target and source database versions are the same. The target database patch version must be the same or higher than the source database patch version.
  4. Check the size of the disk groups and usage on the source database (Oracle Automatic Storage Management (Oracle ASM) Disk Groups or Oracle ASM Cluster File System (Oracle ACFS) File Systems) and ensure that adequate storage is provisioned and available on the target system.

Create a ZDM Response File

Create a ZDM response file to capture the essential parameters to drive the database migration.

Use the sample /u01/app/zdmhome/rhp/zdm/template/zdm_template.rsp file to create the response file, then update the example entries to reflect your source, target, and backup environments.

  1. Create a response file from the template.
    cp $ZDM_HOME/rhp/zdm/template/zdm_template.rsp ~/zdm.rsp
    You'll update the target parameters in the following steps.
  2. Update the Target DB Name Properties to provide the unique name for the target database.
    The name is available in the DB System details.
    TGT_DB_UNIQUE_NAME=unique name for the target database
  3. Ensure that the Migration Method is set to the default value of DG_OSS.
    DG_OSS uses Oracle Data Guard and Oracle Cloud Infrastructure Object Storage service.
    MIGRATION_METHOD=DG_OSS
  4. Define the Platform Type as a virtual machine database.
    PLATFORM_TYPE=VMDB
  5. Specify the Target Database Datafile Storage Properties for either Oracle Automatic Storage Management (Oracle ASM) or Oracle ASM Cluster File System (Oracle ACFS).
    # Target Database Datafile Storage Properties
    #------------------------------------------#
    # if using ASM for datafiles
    # e.g., TGT_DATADG=+DATAC3
    TGT_DATADG=+DATA
    TGT_REDODG=+RECO
    TGT_RECODG=+RECO
    #------------------------------------------#
    # if using ACFS for datafiles
    #------------------------------------------#
    TGT_DATAACFS=
    TGT_REDOACFS=
    TGT_RECOACFS=
    
  6. If a proxy is required to access Oracle Cloud Infrastructure Object Storage from the source node, then define the source HTTP proxy URL and port. If SSH proxy is required to access the source node from the ZDM service host, then specify the source proxy URL and port.
    SRC_HTTP_PROXY_URL=
    SRC_HTTP_PROXY_PORT=
  7. If SSH tunneling is setup, then specify the SSH tunnel port.
    TGT_SSH_TUNNEL_PORT
  8. Update the Oracle Cloud Infrastructure Object Storage host name (the cloud storage REST endpoint URL) to access the Oracle Cloud account.
    To find the Object Storage namespace, open the Console and go to Object Storage Settings. Click Administration, then Tenancy Details.
    HOST=https://swiftobjectstorage.region.oraclecloud.com/v1/object_storage_namespace
    
  9. Specify the name of the Object Storage bucket that you created in the Console.
    # The name of the target Bucket in the tenancy
    OPC_CONTAINER=migration
    
  10. If a proxy is required to access the object storage from the source node, then specify the source proxy host and port.
    SRC_OSS_PROXY_HOST=
    SRC_OSS_PROXY_PORT=
  11. If a proxy is required to access the object storage from the target node, then specify the target proxy host and port.
    TGT_OSS_PROXY_HOST=
    TGT_OSS_PROXY_PORT=