Migrate the Data

You can use a configuration file or individual mv2adb commands to define the options and parameters needed to migrate the data to the cloud. The configuration file is the preferred method. Before migrating, review the Schema Advisor Report.

Create and Analyze the Schema Advisor Report

Create a report for each schema to determine if you can transfer the data into an autonomous database in the cloud and which database objects are problematic.

Oracle Autonomous Database (ADB) Schema Advisor is a light-weight utility that analyzes your on-premises Oracle Database schemas. The Advisor discovers the schema objects and performs a deep analysis to highlight the differences when the object is created on an Oracle Autonomous Data Warehouse database, including why an object can't be created.

Run the advisor on an existing schema to generate a report that provides the following information:

  • A count of discovered objects and a summary of the migration status.
  • A list of objects that can't be migrated to the Autonomous Database due to restrictions or lockdowns imposed on certain data types, Oracle Database options and SQL.
  • A list of objects that will migrate with modifications automatically done during the import or the object creation process.
  • An information section that includes best practice recommendations and guidance

The advisor is installed as part of the MV2ADB software installation.

Advisor command options are:


mv2adb advisor {--conf <conf file path>[--nosudo]} |
               {--ohome <Local ORACLE_HOME> | --ichome <Local Oracle Instant Client Home>
                --dbcs <Source DB connect string>
                --schemas <comma separated database schemas to report>
                --adbtarget <ADW|ADWD|ATP|ATPD> | --adbname <ADB database name> --adbcfile <ADB credential zip file>
               [--nosudo]}
  1. Run the mv2adb advisor on your source database schema with your configuration file.
    # ./mv2adb advisor -conf conf/DBNAME.mv2atp.cfg
  2. Review the report findings.

Migrate the Data by Using a Configuration File

After you define the source and target databases and parameters in the configuration file, issue the command mv2adb auto to export the data from your on-premises database, upload the data to Oracle Cloud Infrastructure Object Storage, and then transfer it to Oracle Autonomous Database in the cloud with a single click.

The auto command reads the configuration file and performs the Oracle Data Pump export (expdp) for each schema defined in the file, uploads the data to Oracle Cloud Infrastructure Object Storage, then performs the Oracle Data Pump import (impdp) into your autonomous database in the cloud.
  • Issue the command auto to begin the data migration.
    # ./mv2adb auto -conf conf/DBNAME.mv2atp.cfg

Migrate the Data Without Using a Configuration File

If you don't want to use a configuration file method of migration process, then you can use a 3-step command-line interface process to define the parameters and run the migration in steps.

  1. Use the Oracle Data Pump Export command expdp to move the data schemas from the source database to storage in the on-premises data center.
    Define the DBCS host, schema, export path, Oracle Home, autonomous database (ADB) name and ADB credential zip file. You'll be prompted to enter the source database SYSTEM password and the autonomous database (ADB) Admin password.

    Define the following source database parameters:

    • --dbcs: Source database host name or IP address. For example, //ip address/DB122H1 or //host name/DB122H1.
    • --schemas: Comma separated list of database schemas to export.
    • --dumpname: Dump file name. For example, ExpDP.
    • --dumppath: Dump file path where the expdp dump will be created. On an Oracle RAC environment, the dump path must be a shared filesystem.
    • --ohome: RDBMS Oracle Home.
    • --adbname: Autonomous database name.
    • --adbcfile: Autonomous database credential wallet zip file location.
    # ./mv2adb.bin expdp \
    --dbcs //host name/DB122H1 \
    --schemas SCHEMA_1,SCHEMA_2,SCHEMA_3,SCHEMA_4 \
    --dumpname expdp.dmp 
    --dumppath /tmp \
    --ohome /u01/app/oracle/product/12.2.0.1/dbhome_1 \
    --adbname autonomous database name \
    --adbcfile /opt/mv2adb/source/Wallet_autonomous database name.zip \
    
  2. Upload the dump file to Oracle Cloud Infrastructure Object Storage.

    Enter the autonomous database properties.

    • -ociregion: Oracle Cloud Infrastructure region. For example, us-phoenix.
    • -ocinamespace: Oracle Cloud Infrastructure namespace name, which is a system-generated string assigned during account creation.
    • -ocibucket: Name of the Oracle Cloud Infrastructure Object Storage bucket.
    • -ociId: user ID.
    • -dumpfiles: Comma separated list of dump files. This parameter is used only by listdump, getdump, putdump, deldump, and impdp functions. When using impdp, the path is not important, only the filename is used.
    # ./mv2adb.bin putdump 
    -ociregion Oracle Cloud Infrastructure region \
    -ocinamespace NAMESPACE_NAME \
    -ocibucket BUCKET_NAME \
    -ociId mail@example.com \
    -dumpfiles /tmp/rcatp_exp01_01.dmp
    
  3. Use the Oracle Data Pump Import command impdp to import the files into the autonomous database.

    Enter the autonomous database properties.

    • -ociregion: Oracle Cloud Infrastructure region. For example, us-phoenix.
    • -ocinamespace: Oracle Cloud Infrastructure namespace name, which is a system-generated string assigned during account creation.
    • -ocibucket: Name of the Oracle Cloud Infrastructure Object Storage bucket.
    • -ociid: Oracle Database Backup Cloud Service account.
    • adbname: The name of the autonomous database.
    • -cfile: The name and location of the credential zip file.
    • -ichome: The Instant Client Oracle Home. If the source database is 11g or 12c, then this parameter is required. If the source database is 18c or above, then this parameter is not required.
    • -dumpfile: Comma separated list of dump files. This parameter is used only by listdump, getdump, putdump, deldump, and impdp functions. When using impdp, the path is not important, only the filename is used.
    • -enctype: The Expdp and Impdp encryption type {AES128 | AES192 | AES256}. The default is AES128.
    # ./mv2adb.bin impdp \
    -ociregion Oracle Cloud Infrastructure region \
    -ocinamespace NAMESPACE_NAME \
    -ocibucket BUCKET_NAME \
    -ociid mail@example.com \
    adbname- autonomous database name \
    -cfile /opt/mv2adb/source/Wallet_autonomous database name.zip \
    -ichome /u01/app/oracle/product/instantclient_18_3 \
    -dumpfile rcatp_exp_01.dmp,rcatp_exp_02.dmp \
    -encryption \
    -enctype AES256
    

Verify the Migration

Use the report to generate a schema object report to compare the results of the Oracle Data Pump export and import.

The following are the report parameters:

mv2adb report {--conf <conf file path>[--nosudo]} |
              {--dbcs <Source DB connect string>
               --schemas <Database schemas to report>}
               --ohome <Local ORACLE_HOME> | --ichome <Local Oracle Instant Client Home>
               --adbname <ADB database name>
               --adbcfile <ADB credential zip file>
              [--nosudo]}
  1. Generate the report.
    # ./mv2adb report
          -conf conf/DBNAME.mv2atp.cfg
  2. Diagnostics information is available in the log file in the /opt/mv2adb/out/log directory.
    If you need to debug Oracle Data Pump, and you need METRICS=Y LOGTIME=ALL parameters, you can use the -dpdebug option to set the datapump debug parameters.