Migrate the Data

Use the Oracle Data Pump expdp and impdp commands to migrate the data.

Migrate the Data in Three Steps

Migrate the data from on-premises to Oracle Cloud Infrastructure File Storage in three steps, or create a shell script to run the three step migration.

  1. Export the selected schemas from the source database system using the source database password and PDB name.
    This example uses the HR schema, hr.dmp, and hr.log.
    $ expdp  system/password@pdb dumpfile=hr.dmp directory=bdir logfile=hr.log schemas=HR
  2. Use scp to copy the dump file to Oracle Cloud Infrastructure File Storage.
    $ scp -i ~/oracle.pkm /opt/oracle/oradata/backup/hr.dmp opc@<ip address of the Exadata DB>:/mnt/fs-phx-ad3/dpdump/
  3. Import the dump file from Oracle Cloud Infrastructure File Storage into the target instance using the Exadata password and PDB name.
    $ impdp system/password@Exadata PDB schemas=HR directory= dpdump dumpfile=hr.dmp logfile=hr.log

Validate the Migration

Use the SQL Developer Tool to validate the data migration.

  1. Open the SQL Developer Tool and use the Query Builder to create a query for a count of the number of dba_objects for the owner in the target database. In this example, the owner is HR.
    select count(*) from dba_objects where owner = 'HR';
  2. Confirm that the total object count in the target database matches the count in the source database.