Creating Oracle migrations

A migration resource is a definition of your migration containing all settings and parameters that are eventually used when performing a migration.

The following procedure explains how to create migrations, which contain the settings for running migration jobs with Database Migration. You can create multiple migration resources with different parameter settings to test different scenarios.

Creating a migration

  1. Log in to the Console as a user with permissions to access Database Migration.

  2. Open the navigation menu. Under Database Migrations click Migrations. A list of the migration resources in the currently selected compartment is displayed.

  3. Click Create migration.

    This opens the Create migration wizard.

  4. In the General Information step, configure the following settings, then click Next.

    • Name: Enter a unique name for the migration.

      On completion of the Create Migration wizard, the name you enter here is displayed in the list of migrations on the Migrations page.

    • Add an optional Description: for the migration resource.
    • Compartment: Select the compartment in which the Database Migration service is hosted.

  5. The Show advanced options section allows you to optionally create tags.
  6. In the Select databases step, enter the following information, then click Next.

    Enter the following information in the Source database box.

    • Database connection in Compartment: Select the source database connection entry.

      If the source database is a PDB, make sure you selected the PDB database connection in the drop-down, not the CDB connection.

      Do not choose an Autonomous Database connection, as Autonomous is not supported as a source database.

    • Database is pluggable database (PDB): If the source database is a PDB, check this box so you can also enter the CDB details.

      Container database connection in Compartment: If the source database is a PDB, select the CDB you selected here. The CDB connection is not required if you are doing an offline migration.

    Enter the following information in the Target database box.

    • Database connection in Compartment: Select the target database connection.

  7. In the Migration options step, select one of the following transfer mediums based on your requirement for your migration:

    • Select an Initial load option:

      Data Pump via database link: Enable this option to use a direct SQL*Net connection between the source and target databases. Note that using Data Pump with a database link to Autonomous Database targets requires that the source database be set up with SSL encryption.
      Note

      If your source database is Oracle Database Standard Edition 2, select the Datapump via database link: option as the transfer medium. Encryption for the exported Datapump dumps is not available for the object storage or file storage transfer mediums.

      Data Pump via object storage: This option lets Data Pump temporarily store the exported database in an Object Storage bucket. If this option is enabled, also configure the following settings.

      • Amazon S3 bucket: Enter the details for the Amazon S3 bucket. This option is only shown if the source database connection is of type Amazon RDS.

        The bucket Name must be between 3 and 63 characters, and can consist only of lower case letters, numbers, dots (.), and hyphens (-). It must begin and end with a letter or number.

        The Region must be in the same region as the RDS Oracle database. For example us-east-1

        For more information about the Amazon RDS source database use case, see Migrating Databases from Amazon Web Services RDS to Supported Oracle Targets.

      • Export directory object: Enter the file Name and Path to the directory object that will be used by Data Pump export on the source database server file system. Database Migration handles the directory object creation for you.

        The name must comply with Oracle Database directory object rules. See CREATE DIRECTORY in Oracle Database SQL Language Reference.

      Note

      Oracle recommends using Data Pump via object storage as the preferred transfer medium. Data Pump via database link is only recommended for small databases as you cannot enable parallelism which affects the migration performance.
      Data Pump via file storage: Enable this option to use a shared File Storage Service (FSS) mount as the transfer medium between source and target databases.
      • Network access to your file system is provided through a mount target (OCID provided in the OCI Console).
      • Your file system must have at least one export in the mount target used to mount and use the file system.
      • When creating the file system using the OCI Console, the workflow also creates a mount target and an associated export.
      • Exports control how NFS clients access file systems when they connect to a mount target.
      Note

      Following are the prerequisites to use this option:
      • You must Create a File System and specify the mount target and the export path.
      • You must have the shared file system mounted on both the source and target database hosts.
      • Supported source database: This transfer medium is supported for all the supported on-premises database cases excluding Amazon RDS.
      • Supported target database : This transfer medium is supported for both non-ADB and ADB target databases (All Oracle Cloud Infrastructure co-managed and Exadata).
      • To perform the Data Pump export, you must have the read or write access to the shared mounts on the source host.
      • On the target database host, you must at least have read access to the shared mount to perform the Data Pump import.
      • See Mounting File Systems and Creating a Mount Target for more information.

      Enter the following information in the Source database box:

      • Export directory object name: Name of the export directory object
      • Export directory object path: The shared file system mount path on the source database with read and write access.
      • Source Database file system SSL Wallet Path
        Note

        This field is displayed only when the SSH details are not provided during source database connection while performing migration to Autonomous database.

      If you enable this option when the target database is Autonomous database, then configure the following settings. Enter the following information in the Target database box:

      • Shared storage mount target in compartment: The file system mount target to be used in the target database.
        Note

        You can use the mount targets only when the target database is Autonomous database. For any other databases, use the shared file system based mount point.
      • Import directory object name: The Data Pump import directory object name used to mount the shared file system.

      If you enable this option when the target database is non Autonomous database, then configure the following settings. Enter the following information in the Target database box:

      • Import directory object name: The Data Pump import directory object name used to mount the shared file system.
      • Import directory object path: The Data Pump import directory object name used to mount the shared file system.
    • Object storage bucket in Compartment: Select the object storage bucket. This bucket is used for any Cloud Premigration Advisor Tool reports, Database Migration, and Data Pump log storage, and Data Pump dump files.

      If the bucket is in a different compartment, click Change Compartment to look in another compartment.

  8. If the source or the target database is non-ADB, then the following fields are shown when the initial Data Pump load is performed via object storage or file storage:

    Enter the following information in the Source database box:

    • Export directory object name:
    • Export directory object path:
    • Source Database file system SSL Wallet Path
      Note

      This field is displayed only when the SSH details are not provided during source database connection.

    Enter the following information in the Target database box:

    • Import directory object name
    • Import directory object path
    • Target Database file system SSL Wallet Path
      Note

      This field is displayed only when the SSH details are not provided during target database connection.
    If your source or target is non-ADB and you did not provide the SSH details for both source and target database when creating your database connection, and your transfer medium is object storage, you must perform the following steps:
    • Download SSL Wallet with Certificates
    • Set up Network ACL

    You can download a pre-created wallet.

    To download a wallet:
    1. Download the wallet file.
    2. Unzip the certificate files to a directory on the file system of your database host.
    3. Enter this location in SSL Wallet Path when creating the migration.

    The user performing the export or import requires the necessary network ACL to be granted to access the network from the source and target database host.

    In the following example, run the following commands as SYS if the export or import user is SYSTEM. If your database is multitenant, then perform the following actions in CDB$ROOT. Restrict the host as required.

    Security consideration: Do not allow a complete network access from the database. Restrict the host access to the required OCI object storage region. For example, https://objectstorage.us-ashburn-1.oraclecloud.com and ACL can be time restricted with relevant start_date and end_date arguments in DBMS_NETWORK_ACL_ADMIN.CREATE_ACL. For example:
    @$ORACLE_HOME/rdbms/admin/sqlsessstart.sql
    define clouduser=<user performing export at src or import at target e.g., SYSTEM>
    define sslwalletdir=< OCI wallet path e.g., /opt/oracle/dcs/commonstore/import_dmp/nossh_wallet>
    begin
    dbms_network_acl_admin.append_host_ace(
            host =>'*',
            lower_port => 443,
            upper_port => 443,
            ace => xs$ace_type(
                    privilege_list => xs$name_list('http', 'http_proxy'),
                    principal_name => upper('&clouduser'),
                    principal_type => xs_acl.ptype_db));
    dbms_network_acl_admin.append_wallet_ace(
        wallet_path => 'file:&sslwalletdir',
            ace => xs$ace_type(privilege_list =>
                    xs$name_list('use_client_certificates', 'use_passwords'),
                    principal_name => upper('&clouduser'),
                    principal_type => xs_acl.ptype_db));
    end;
    
    /
    @$ORACLE_HOME/rdbms/admin/sqlsessend.sql
    

    Once the connect privilege is granted, connect as the relevant user such as, SYSTEM and verify if the privilege is granted using the following query:

    COLUMN host FORMAT A30
    SELECT host, lower_port, upper_port, privilege, status FROM user_network_acl_privileges;
    

    For more information, see How To Set Network ACLs.

  9. If you want to create an online migration, check the Use online replication option to enable the replication of all data and metadata transactions from the source to the target database, committed after the initial load has begun. For additional optional configurations, see the Replication tab in the Show advanced options. Optionally, you can set some additional properties which can affect the performance of your online migration.
    Note

    Oracle recommends using the default Use online replication option to perform an online replication.
    Note

    Skip this step for offline (Data Pump only) migrations.
  10. Optionally, select Show Advanced Options to configure advanced Data Pump, validation, and Oracle GoldenGate settings.

    For details about these settings see Selecting objects for Oracle migration, Configuring initial load advanced options for Oracle migrations, Configuring validation options, and Configuring optional replication advanced options.

  11. Click Create.

    The migration is loaded, and a new Migration Details page opens showing the information, metrics, and operations for the migration.

    The status of the creation operation is shown under the DM icon. When the status is Active, you can run migration jobs with the migration.

    Alternatively click Save as stack option to save the migrations as a stack.

    The Save as stack pane is displayed. You can save the migration resource configurations as a stack. Use the stack to install, configure, and manage the resource through the Resource Manager service.

    The following options are available:

    1. Name (Optional)
    2. Description (Optional)
    3. Save in your compartment
    4. Optionally, add Tags to organize your resources.
    5. Click Save to save as a stack.
    6. Click Cancel if you do not want to save the stack.

    After you save the Stack, it displays a link in the upper right corner that directs you to the newly created Stack in the Resource Manager. See the following topics for the next steps: