Set Up the Future Primary Database

You'll set up the future primary Oracle Exadata Database Service on Dedicated Infrastructure and configure Oracle Zero Downtime Migration to prepare to migrate the PeopleSoft database to OCI.

About Oracle Zero Downtime Migration Prerequisites

The following are the most critical Oracle Zero Downtime Migration (ZDM) prerequisites for a successful migration:

  1. ZDM Host Server

    Provision a dedicated host or VM to host the ZDM installation, which includes a small Oracle Clusterware footprint, a MySQL database, and Fleet Patching and Provisioning. This server should have the latest Oracle Linux 7 image installed. This VM shape can be small, 2 cores with 16GB of physical RAM are sufficient. The ZDM server orchestrates all of the database migration tasks at both the source and target systems.

  2. Network Connectivity
    The type of network connectivity you have from on-premises to resources on OCI will determine your ZDM migration method and data transfer options. Oracle Zero Downtime Migration allows for different network connectivity topologies including direct connections throughOCI FastConnect or IPSec VPN, use of SSH tunnels, proxy servers, and bastion hosts.

    Note:

    It is extremely important to understand how your on-premises systems will access OCI resources and whether OCI resources must access specific on-premises systems, and if so, by what network path.
    Consider the following:
    1. The ZDM host sever must be able to access both on-premises source and OCI target systems
    2. For ONLINE migration methods using Oracle Data Guard, the source and target systems must be able to access each other.
  3. Transparent Data Encryption (TDE)

    OCI requires that all databases are encrypted. If it is not possible to encrypt the data itself before the database is transferred into OCI, you can create a TDE keystore wallet at the source and the ZDM migration process will encrypt the data files at the target. A TDE wallet is required at the source for database versions 12.2 and higher, but you can use this method for earlier database releases.

    For the steps for setting the TDE keystore, see "Setting Up the Transparent Data Encryption Keystore" in Move to Oracle Cloud Using Zero Downtime Migration.

  4. Placeholder Database
    You must create a placeholder database on the target Oracle Exadata Database Service on Dedicated Infrastructure before migrating with Oracle Zero Downtime Migration. ZDM will removed the placeholder database's data structures as part of the migration process, with the source database’s structures restored in its place. Its metadata will remain in place. Use the OCI Console to create it, with these constraints:
    1. The database home must be at the same software version, release, and patch level as the primary.
    2. The DB_NAME must be the same as on the primary database.
    3. The DB_UNIQUE_NAME can be left blank or specified, but it must be different from the primary.
    4. The SYS password must be the same as on the primary, as we are using Oracle Data Guard.
    5. Do not create a pluggable database (PDB) in this container database (CDB).
    6. Do not configure automatic backups when provisioning this database
  5. SSH access

    Oracle Zero Downtime Migration requires SSH access to both the source and target systems. For the target, you will use the opc cloud user and passwordless SSH keys. For an on-premises source, you will use the root user. You can configure passwordless SSH keys and use them without passphrases, or you can use the root user and password. See Oracle Zero Downtime Migration to set up SSH access and ensure the ZDM host server can access the source and target systems.

Note:

See Move to Oracle Cloud Using Zero Downtime Migration for a complete description of the prerequisites for Oracle Zero Downtime Migration.

Configure Oracle Zero Downtime Migration for the Database Migration

Once your prerequisites are addressed and you've installed Oracle Zero Downtime Migration, you can create a response file to configure your database migration.

  1. Copy the response file template found at $ZDM_HOME/rhp/zdm/template/zdm_template.rsp to your working directory on the Oracle Zero Downtime Migration host server.
  2. Edit the response file for your database migration.
    There are several parameters available to control the migration.
    For example, you can set your migration up to configure Oracle Data Guard and Oracle Data Guard Broker, and to minimize downtime:
    ZDM Parameter Value Comments
    TGT_DB_UNIQUE_NAME CDBHCM_iad1dx Specifies the db_unique_name of the placeholder database.
    MIGRATION_METHOD ONLINE_PHYSICAL The migration method used by Oracle Zero Downtime Migration that does not require the primary database to be down.
    DATA_TRANSFER_MEDIUM OSS Oracle Zero Downtime Migration uses the OCI Object Storage service to stage the backup of the database to then restore from it. You can use other transfer methods, such as DIRECT which can make use of RMAN RESTORE FROM SERVICE without having to stage the database in object storage. For DIRECT, other Oracle Zero Downtime Migration parameters are required, see the Oracle Zero Downtime Migration documentation.
    PLATFORM_TYPE ExaCS[1] The target system for the migration is Exadata Cloud Service.
    TGT_RETAIN_DB_UNIQUE_NAME TRUE For Oracle Data Guard to ship logs back to the source, the target (TGT) database DB_UNIQUE_NAME is retained during the migration process.
    TGT_SKIP_DATAPATCH TRUE Skip running datapatch on the target database.
    SHUTDOWN_SRC FALSE Do not shut down the source database once migration is complete.
    SRC_RMAN_CHANNELS 10 Oracle Recovery Manager (RMAN) will allocate 10 channels on the source database for parallel backup of the database.
    TGT_RMAN_CHANNELS 10 Oracle RMAN will allocate 10 channels on the target database for parallel restore of the database.
    ZDM_USE_DG_BROKER TRUE Oracle Zero Downtime Migration will configure Oracle Data Guard Broker as part of the migration process.
    HOST https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/maacloud OCI Object Storage service endpoint URL. Needed for OCI Object Storage data transfer medium.
    OPC_CONTAINER ZDM_Backup OCI Object Storage bucket name. Needed for OCI Object Storage data transfer medium.

    [1] The accepted value for PLATFORM_TYPE for Oracle Exadata Database Service on Dedicated Infrastructure is ExaCS.

  3. Determine the remaining parameters and settings that are appropriate for your scenario.
    In our example, we were able to accept the default values for remaining parameters. See the Oracle Zero Downtime Migration documentation for details.

Test the Configuration and Oracle Zero Downtime Migration Parameter File

To test your preparation steps and configuration file, run Oracle Zero Downtime Migration in evaluation mode.

The -eval command line option instructs Oracle Zero Downtime Migration to perform prechecks only for all its migration process phases, then to stop. No changes are made to the systems. Oracle Zero Downtime Migration prechecks are performed on both source and target databases and, if DATA_TRANSFER_MEDIUM is set to OSS, on OCI Object Storage.
  1. Run prechecks of the migration process.
    For example,
    $ZDM_HOME/bin/zdmcli migrate database \
     -sourcedb CDBHCM_sca6dp \
     -sourcenode scaqan10dv0505.example.com \
     -srcauth zdmauth \
     -srcarg1 user:opc \
     -srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk \
     -srcarg3 sudo_location:/usr/bin/sudo \
     -targetnode iadexadb-bw5wn1.ebsexadbprivate.ebscloudmaavcn.oraclevcn.com \
     -backupuser <oci user name> \
     -rsp /home/zdmuser/zdm_CDBHCM_migration.rsp \
     -tgtauth zdmauth \
     -tgtarg1 user:opc \
     -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk \
     -tgtarg3 sudo_location:/usr/bin/sudo \
     -eval

    All Oracle Zero Downtime Migration jobs are performed through a job scheduling mechanism and are executed asynchronously. When an Oracle Zero Downtime Migration command is issued, you'll receive a job ID that you can use to check the job status.

  2. Check the status of your job.
    For example, run the following command to query the status of job ID 5:
    $ $ZDM_HOME/bin/zdmcli query job -jobid 5
    The output indicates which task is running, which tasks are pending, and whether the prechecks have succeeded or failed. As you query the job status, you can see the progression until the job has executed all required tasks.
  3. Run zdmcli with -eval as many times as necessary for all prechecks to pass.
    If any task is marked PRECHECK_FAILED, then consult the “Result” log file for errors and correct them.
  4. Before doing an actual migration, ensure that the evaluation mode returns PRECHECK_PASSED for all precheck tasks.
    For example,
    iad-zdm. ebsexadbprivate.ebscloudmaavcn.oraclevcn.com: Audit ID: 50
    Job ID: 5
    User: zdmuser
    Client: iad-zdm
    Job Type: "EVAL"
    Scheduled job command: "zdmcli migrate database -sourcedb CDBHCM_sca6dp -sourcenode scaqan10dv0505.mycompany.com -srcauth zdmauth -srcarg1 user:opc -srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk -srcarg3 sudo_location:/usr/bin/sudo -targetnode iadexadb-bw5wn1.ebsexadbprivate.ebscloudmaavcn.oraclevcn.com -backupuser <oci user name> -rsp /home/zdmuser/zdm_CDBHCM_migration.rsp -tgtauth zdmauth -tgtarg1 user:opc -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk -tgtarg3 sudo_location:/usr/bin/sudo -eval"
    Scheduled job execution start time: 2022-07-26T20:26:01Z. Equivalent local time: 2022-07-26 20:26:01
    Current status: SUCCEEDED
    Result file path: "/u01/app/zdmbase/chkbase/scheduled/job-5-2022-07-26-20:26:21.log"
    Metrics file path: "/u01/app/zdmbase/chkbase/scheduled/job-5-2022-07-26-20:26:21.json"
    Job execution start time: 2022-07-26 20:26:21
    Job execution end time: 2022-07-26 20:30:37
    Job execution elapsed time: 4 minutes 16 seconds
    ZDM_GET_SRC_INFO ........... PRECHECK_PASSED
    ZDM_GET_TGT_INFO ........... PRECHECK_PASSED
    ZDM_PRECHECKS_SRC .......... PRECHECK_PASSED
    ZDM_PRECHECKS_TGT .......... PRECHECK_PASSED
    ZDM_SETUP_SRC .............. PRECHECK_PASSED
    ZDM_SETUP_TGT .............. PRECHECK_PASSED
    ZDM_PREUSERACTIONS ......... PRECHECK_PASSED
    ZDM_PREUSERACTIONS_TGT ..... PRECHECK_PASSED
    ZDM_OBC_INST_SRC ........... PRECHECK_PASSED
    ZDM_OBC_INST_TGT ........... PRECHECK_PASSED
    ZDM_VALIDATE_SRC ........... PRECHECK_PASSED
    ZDM_VALIDATE_TGT ........... PRECHECK_PASSED
    ZDM_POSTUSERACTIONS ........ PRECHECK_PASSED
    ZDM_POSTUSERACTIONS_TGT .... PRECHECK_PASSED
    ZDM_CLEANUP_SRC ............ PRECHECK_PASSED
    ZDM_CLEANUP_TGT ............ PRECHECK_PASSED

Migrate the PeopleSoft Database

You can use Oracle Zero Downtime Migration to migrate the database. By default, it will migrate the database and then switch over to it.

Note:

We DO NOT want Oracle Zero Downtime Migration to perform the switchover, so will use the -stopafter clause to stop after the phase ZDM_CONFIGURE_DG_SRC is complete.

  1. Run database migration process and specify -stopafter to stop the migration.
    For example,
    $ZDM_HOME/bin/zdmcli migrate database \
     -sourcedb CDBHCM_sca6dp \
     -sourcenode scaqan10dv0505.mycompany.com \
     -srcauth zdmauth \
     -srcarg1 user:opc \
     -srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk \
     -srcarg3 sudo_location:/usr/bin/sudo \
     -targetnode iadexadb-bw5wn1.ebsexadbprivate.ebscloudmaavcn.oraclevcn.com \
     -backupuser <oci user name> \
     -rsp /home/zdmuser/zdm_CDBHCM_migration.rsp \
     -tgtauth zdmauth \
     -tgtarg1 user:opc \
     -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk \
     -tgtarg3 sudo_location:/usr/bin/sudo \
     -stopafter ZDM_CONFIGURE_DG_SRC

    The command returns a job ID that you can use to check the job status.

  2. Check the status of your job.
    For example, run the following command to query the status of job ID 6:
    $ $ZDM_HOME/bin/zdmcli query job -jobid 6

    The following is an example of the final output after completing the phase ZDM_CONFIGURE_DB_SRC.

    iad-zdm. ebsexadbprivate.ebscloudmaavcn.oraclevcn.com: Audit ID: 74
    Job ID: 6
    User: zdmuser
    Client: iad-zdm
    Job Type: "MIGRATE"
    Scheduled job command: "zdmcli migrate database -sourcedb CDBHCM_sca6dp -sourcenode scaqan10dv0505.mycompany.com -srcauth zdmauth -srcarg1 user:opc -srcarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk -srcarg3 sudo_location:/usr/bin/sudo -targetnode iadexadb-bw5wn1.ebsexadbprivate.ebscloudmaavcn.oraclevcn.com -backupuser <oci user name> -rsp /home/zdmuser/zdm_CDBHCM_migration.rsp -tgtauth zdmauth -tgtarg1 user:opc -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_host.ppk -tgtarg3 sudo_location:/usr/bin/sudo -pauseafter ZDM_CONFIGURE_DG_SRC"
    Scheduled job execution start time: 2022-07-26T20:35:24Z. Equivalent local time: 2022-07-26 20:35:24
    Current status: PAUSED
    Current Phase: "ZDM_CONFIGURE_DG_SRC"
    Result file path: "/u01/app/zdmbase/chkbase/scheduled/job-6-2022-07-26-20:35:51.log"
    Metrics file path: "/u01/app/zdmbase/chkbase/scheduled/job-6-2022-07-26-20:35:51.json"
    Job execution start time: 2022-07-26 20:35:51
    Job execution end time: 2022-07-26 21:37:05
    Job execution elapsed time: 1 hours 1 minutes 14 seconds
    ZDM_GET_SRC_INFO ............... COMPLETED
    ZDM_GET_TGT_INFO ............... COMPLETED
    ZDM_PRECHECKS_SRC .............. COMPLETED
    ZDM_PRECHECKS_TGT .............. COMPLETED
    ZDM_SETUP_SRC .................. COMPLETED
    ZDM_SETUP_TGT .................. COMPLETED
    ZDM_PREUSERACTIONS ............. COMPLETED
    ZDM_PREUSERACTIONS_TGT ......... COMPLETED
    ZDM_OBC_INST_SRC ............... COMPLETED
    ZDM_OBC_INST_TGT ............... COMPLETED
    ZDM_VALIDATE_SRC ............... COMPLETED
    ZDM_VALIDATE_TGT ............... COMPLETED
    ZDM_BACKUP_FULL_SRC ............ COMPLETED
    ZDM_BACKUP_INCREMENTAL_SRC ..... COMPLETED
    ZDM_DISCOVER_SRC ............... COMPLETED
    ZDM_COPYFILES .................. COMPLETED
    ZDM_PREPARE_TGT ................ COMPLETED
    ZDM_SETUP_TDE_TGT .............. COMPLETED
    ZDM_CLONE_TGT .................. COMPLETED
    ZDM_FINALIZE_TGT ............... COMPLETED
    ZDM_CONFIGURE_DG_SRC ........... COMPLETED

When this command complete the ZDM_CONFIGURE_DG_SRC step, Oracle Zero Downtime Migration has copied the source database into OCI, set it up as a standby of the source, configured Data Guard Broker, and started redo apply. The new OCI standby is being synchronized with the source primary.

Oracle Zero Downtime Migration also completed the following tasks:

  • Registered the migrated database into Oracle Clusterware
  • Updated the OCI control plane metadata with updated information including any pluggable databases (PDBs) that are within the standby database
  • Encrypted the data files of the standby database using Transparent Data Encryption (TDE), as noted in the Oracle Zero Downtime Migration prerequisites.

    Note:

    The WALLET_TYPE in the view V$ENCRYPTION_WALLET is set to AUTOLOGIN.

Define Role-Based Databases Services for Future Primary

Add role-based database services that the PeopleSoft application will use when the OCI database is filling the PRIMARY role, for both online users and the process scheduler.

  • Add role-based database services for online users and the process scheduler.
    srvctl add service -db CDBHCM_iad1dx -pdb HR92U033 -service HR92U033_BATCH -preferred "CDBHCM1,CDBHCM2" -notification TRUE -role PRIMARY,SNAPSHOT_STANDBY -failovermethod BASIC -failovertype AUTO -failoverretry 10 -failoverdelay 3
    
    srvctl add service -db CDBHCM_iad1dx -pdb HR92U033 -service HR92U033_ONLINE -preferred "CDBHCM1,CDBHCM2" -notification TRUE -role PRIMARY,SNAPSHOT_STANDBY -failovermethod BASIC -failovertype AUTO -failoverretry 10 -failoverdelay 3