Import Schema in to Oracle Autonomous Database

Follow the steps below to import the Data Pump file (export.dmp) in to your Oracle Autonomous Database.

See To create an auth token in Managing User Credentials in Oracle Cloud Infrastructure Documentation. Copy the auth token as it will not be displayed again.

Note:

Oracle recommends to use the Oracle Instant Client downloaded from Autonomous Database service console (Development page, Download Oracle Instant Client link).
  1. Sign in to your Oracle Autonomous Transaction Processing or Oracle Autonomous Data Warehouse service console and click Development.
  2. Click Download Oracle Instant Client and save the zip file.
  3. Unzip the file and set the $ORACLE_HOME environment variable to point to this directory.
  4. On the Administration page, click Download Client Credentials (Wallet) and save the zip file.
  5. Extract the file into $ORACLE_HOME/network/admin directory.
  6. Inspect tnsnames.ora file included in the zip to see the list of service names to connect to. Identify the "high" service name of the database into which you are migrating.
  7. Use SQL*Plus to connect to your Autonomous Database as the ADMIN user using the service name you identified in the previous step.
  8. Run the following to create a credential using the DBMS_CLOUD package. Replace OCI_USERNAME with your Oracle Cloud Infrastructure username and OCI_AUTH_TOKEN with your Oracle Cloud Infrastructure auth token you created in a previous step.
    BEGIN
      DBMS_CLOUD.CREATE_CREDENTIAL(
         credential_name => 'def_cred_name',
         username        => 'OCI_USERNAME',
         password        => 'OCI_AUTH_TOKEN'
       );
    END;
    /
  9. Use impdp Data Pump utility to import your Schema Service export file from Oracle Cloud Infrastructure Object Storage to your Autonomous Database. Replace SERVICE_NAME with the "high" service name of your Autonomous Database. Replace APEX_TABLESPACE with the Oracle Application Express (APEX) tablespace name used in your Schema Service database. Replace EXPORT_FILE_URL with the URL to the export.dmp file uploaded in Object Storage. Enter the password for the ADMIN database user when prompted. Make note of the database user that is created by the import operation.
    impdp admin@SERVICE_NAME credential=def_cred_name directory=data_pump_dir remap_tablespace=APEX_TABLESPACE:data \
    dumpfile='EXPORT_FILE_URL' \
    parallel=2 transform=segment_attributes:n transform=dwcs_cvt_iots:y transform=constraint_use_default_index:y \
    exclude=cluster,db_link
    For example:
    impdp admin@demo_high credential=def_cred_name directory=data_pump_dir remap_tablespace=APEX_1234567890:data \
    dumpfile='https://objectstorage.us-phoenix-1.oraclecloud.com/n/.../b/.../o/export.dmp' \
    parallel=2 transform=segment_attributes:n transform=dwcs_cvt_iots:y transform=constraint_use_default_index:y \
    exclude=cluster,db_link
  10. Connect to your Autonomous Database as ADMIN using SQL*Plus and reset the password for the database user that was created as a result of the Data Pump import. The password must conform to the Autonomous Database password complexity rules.
    alter user USERNAME identified by "PASSWORD" account unlock;
For additional information, see: