Docs Menu
Docs Home
/ /

Configure Migration Prerequisites for Oracle

When you migrate data from an Oracle source database, Relational Migrator automatically checks your database for needed configuration changes and generates a SQL script to implement them. Have a Database Administrator (DBA) review the script and run the commands on the database server. This page provides more details on the required configuration steps.

For details on supported versions of Oracle, see Supported Databases and Versions.

  • If you're migrating from an Oracle 12c instance, you must run commands as the SYSDBA role.

  • Oracle 12c introduced the concept of a pluggable database (PDB). Some commands can be run on a PDB, while commands like enabling ARCHIVELOG must be run on the container/master database (CDB). For details on each architecture, see Overview of Container Databases and Pluggable Databases.

  • Some commands differ based on whether the database is single or multi-tenant. In a multi-tenant database, permissions must include the suffix CONTAINER=ALL. To check whether the database is multi-tenant or not, run the following SQL query:

    SELECT cdb AS is_multitenant FROM v$database;

To configure your Oracle instance for snapshot jobs:

1

The following code creates a new Oracle service account for Relational Migrator to connect to the Oracle instance. Alternatively, you can use an existing Oracle service account to connect to Relational Migrator with the appropriate permissions.

Tip

To migrate data from a multi-tenant container database, create tablespaces and a Common User.

  1. Create a service account:

    CREATE USER <user> IDENTIFIED BY "<password>";
  2. Confirm that the service account owns the tables in the migration job.

    Required permissions depend on whether the service account owns the tables used in the migration job. To check table ownership, run the following query:

    SELECT TABLE_NAME, OWNER
    FROM ALL_TABLES
    WHERE TABLE_NAME ='<table_name>'
    ORDER BY OWNER, TABLE_NAME;
  3. Grant permissions to the service account.

    Important

    If you're migrating a multi-tenant container database as a common user, append CONTAINER=ALL when granting permissions. For example:

    GRANT CREATE SESSION TO <user> CONTAINER=ALL;

    If the service account is the table owner:

    GRANT CREATE SESSION TO <user>;
    GRANT SELECT ON V_$DATABASE TO <user>;

    If the service account is not the table owner:

    GRANT CREATE SESSION TO <user>;
    GRANT SELECT_CATALOG_ROLE TO <user>;
    GRANT SELECT ANY TABLE TO <user>;
    GRANT SELECT ON V_$DATABASE TO <user>;
    GRANT FLASHBACK ANY TABLE TO <user>;

Back

Oracle

On this page