oracle.oci.oci_database_migration_migration – Manage a Migration resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.11.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_database_migration_migration.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete a Migration resource in Oracle Cloud Infrastructure

  • For state=present, create a Migration resource that contains all the details to perform the database migration operation, such as source and destination database details, credentials, etc.

  • This resource has the following action operations in the oracle.oci.oci_database_migration_migration_actions module: add_migration_objects, change_compartment, remove_migration_objects.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
advisor_settings
dictionary
This parameter is updatable.
is_ignore_errors
boolean
    Choices:
  • no
  • yes
True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false.
This parameter is updatable.
is_skip_advisor
boolean
    Choices:
  • no
  • yes
True to skip the Pre-Migration Advisor execution. Default is false.
This parameter is updatable.
agent_id
string
The OCID of the registered ODMS Agent. Only valid for Offline Logical Migrations.
This parameter is updatable.
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
OCID of the compartment
Required for create using state=present.
Required for update when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
Required for delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
data_transfer_medium_details
dictionary
This parameter is updatable.
aws_s3_details
dictionary
access_key_id
string
AWS access key credentials identifier Details: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys
This parameter is updatable.
name
string
S3 bucket name.
This parameter is updatable.
region
string
AWS region code where the S3 bucket is located. Region code should match the documented available regions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions
This parameter is updatable.
secret_access_key
string
AWS secret access key credentials Details: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys
This parameter is updatable.
database_link_details
dictionary
name
string
Name of database link from OCI database to on-premise database. ODMS will create link, if the link does not already exist.
This parameter is updatable.
wallet_bucket
dictionary
bucket_name
string
Bucket name.
This parameter is updatable.
namespace_name
string
Namespace name of the object store bucket.
This parameter is updatable.
object_storage_details
dictionary
bucket_name
string
Bucket name.
This parameter is updatable.
namespace_name
string
Namespace name of the object store bucket.
This parameter is updatable.
datapump_settings
dictionary
This parameter is updatable.
data_pump_parameters
dictionary
estimate
string
    Choices:
  • BLOCKS
  • STATISTICS
Estimate size of dumps that will be generated.
This parameter is updatable.
exclude_parameters
list / elements=string
Exclude paratemers for Export and Import.
This parameter is updatable.
export_parallelism_degree
integer
Maximum number of worker processes that can be used for a Data Pump Export job.
This parameter is updatable.
import_parallelism_degree
integer
Maximum number of worker processes that can be used for a Data Pump Import job. For an Autonomous Database, ODMS will automatically query its CPU core count and set this property.
This parameter is updatable.
is_cluster
boolean
    Choices:
  • no
  • yes
Set to false to force Data Pump worker process to run on one instance.
This parameter is updatable.
table_exists_action
string
    Choices:
  • TRUNCATE
  • REPLACE
  • APPEND
  • SKIP
IMPORT: Specifies the action to be performed when data is loaded into a preexisting table.
This parameter is updatable.
export_directory_object
dictionary
name
string
Name of directory object in database
This parameter is updatable.
path
string
Absolute path of directory on database server
This parameter is updatable.
import_directory_object
dictionary
name
string
Name of directory object in database
This parameter is updatable.
path
string
Absolute path of directory on database server
This parameter is updatable.
job_mode
string
    Choices:
  • FULL
  • SCHEMA
  • TABLE
  • TABLESPACE
  • TRANSPORTABLE
Data Pump job mode. Refer to link text
This parameter is updatable.
metadata_remaps
list / elements=dictionary
Defines remapping to be applied to objects as they are processed. Refer to DATA_REMAP
new_value
string / required
Specifies the new value that oldValue should be translated into.
old_value
string / required
Specifies the value which needs to be reset.
type
string / required
    Choices:
  • SCHEMA
  • TABLESPACE
  • DATAFILE
  • TABLE
Type of remap. Refer to METADATA_REMAP Procedure
tablespace_details
dictionary
extend_size_in_mbs
integer
Size of extend in MB. Can only be specified if 'isBigFile' property is set to true.
This parameter is updatable.
Applicable when target_type is one of ['ADB_D_AUTOCREATE', 'NON_ADB_AUTOCREATE']
is_auto_create
boolean
    Choices:
  • no
  • yes
True to auto-create tablespace in the target Database.
This parameter is updatable.
Applicable when target_type is one of ['ADB_D_AUTOCREATE', 'NON_ADB_AUTOCREATE']
is_big_file
boolean
    Choices:
  • no
  • yes
True set tablespace to big file.
This parameter is updatable.
Applicable when target_type is one of ['ADB_D_AUTOCREATE', 'NON_ADB_AUTOCREATE']
remap_target
string
Name of tablespace at target to which the source database tablespace need to be remapped.
This parameter is updatable.
Applicable when target_type is one of ['ADB_D_REMAP', 'NON_ADB_REMAP']
target_type
string / required
    Choices:
  • NON_ADB_AUTOCREATE
  • NON_ADB_REMAP
  • ADB_D_REMAP
  • ADB_S_REMAP
  • ADB_D_AUTOCREATE
  • TARGET_DEFAULTS_REMAP
  • TARGET_DEFAULTS_AUTOCREATE
Type of Database Base Migration Target.
This parameter is updatable.
defined_tags
dictionary
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`
This parameter is updatable.
display_name
string
Migration Display Name
Required for create, update, delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
This parameter is updatable when OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: name
dump_transfer_details
dictionary
This parameter is updatable.
source
dictionary
kind
string
    Choices:
  • OCI_CLI
  • CURL
Type of dump transfer to use during migration in source or target host. Default kind is CURL
This parameter is updatable.
oci_home
string
Path to the OCI CLI installation in the node.
This parameter is updatable.
Required when kind is 'OCI_CLI'
target
dictionary
kind
string
    Choices:
  • OCI_CLI
  • CURL
Type of dump transfer to use during migration in source or target host. Default kind is CURL
This parameter is updatable.
oci_home
string
Path to the OCI CLI installation in the node.
This parameter is updatable.
Required when kind is 'OCI_CLI'
exclude_objects
list / elements=dictionary
Database objects to exclude from migration, cannot be specified alongside 'includeObjects'
This parameter is updatable.
object_name
string / required
Name of the object (regular expression is allowed)
owner
string / required
Owner of the object (regular expression is allowed)
type
string
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
This parameter is updatable.
golden_gate_details
dictionary
This parameter is updatable.
hub
dictionary
compute_id
string
OCID of GoldenGate Microservices compute instance.
This parameter is updatable.
rest_admin_credentials
dictionary
password
string
Administrator password
This parameter is updatable.
username
string
Administrator username
This parameter is updatable.
source_container_db_admin_credentials
dictionary
password
string
Administrator password
This parameter is updatable.
username
string
Administrator username
This parameter is updatable.
source_db_admin_credentials
dictionary
password
string
Administrator password
This parameter is updatable.
username
string
Administrator username
This parameter is updatable.
source_microservices_deployment_name
string
Name of GoldenGate Microservices deployment to operate on source database
This parameter is updatable.
target_db_admin_credentials
dictionary
password
string
Administrator password
This parameter is updatable.
username
string
Administrator username
This parameter is updatable.
target_microservices_deployment_name
string
Name of GoldenGate Microservices deployment to operate on target database
This parameter is updatable.
url
string
Oracle GoldenGate Microservices hub's REST endpoint. Refer to https://docs.oracle.com/en/middleware/goldengate/core/19.1/securing/network.html#GUID-A709DA55-111D-455E-8942-C9BDD1E38CAA
This parameter is updatable.
settings
dictionary
acceptable_lag
integer
ODMS will monitor GoldenGate end-to-end latency until the lag time is lower than the specified value in seconds.
This parameter is updatable.
extract
dictionary
long_trans_duration
integer
Length of time (in seconds) that a transaction can be open before Extract generates a warning message that the transaction is long-running. If not specified, Extract will not generate a warning on long-running transactions.
This parameter is updatable.
performance_profile
string
    Choices:
  • LOW
  • MEDIUM
  • HIGH
Extract performance.
This parameter is updatable.
replicat
dictionary
map_parallelism
integer
Number of threads used to read trail files (valid for Parallel Replicat)
This parameter is updatable.
max_apply_parallelism
integer
Defines the range in which the Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)
This parameter is updatable.
min_apply_parallelism
integer
Defines the range in which the Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)
This parameter is updatable.
include_objects
list / elements=dictionary
Database objects to include from migration, cannot be specified alongside 'excludeObjects'
This parameter is updatable.
object_name
string / required
Name of the object (regular expression is allowed)
owner
string / required
Owner of the object (regular expression is allowed)
type
string
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
migration_id
string
The OCID of the migration
Required for update using state=present when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.
Required for delete using state=absent when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: id
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
source_container_database_connection_id
string
The OCID of the Source Container Database Connection. Only used for Online migrations. Only Connections of type Non-Autonomous can be used as source container databases.
This parameter is updatable.
source_database_connection_id
string
The OCID of the Source Database Connection.
Required for create using state=present.
This parameter is updatable.
state
string
    Choices:
  • present ←
  • absent
The state of the Migration.
Use state=present to create or update a Migration.
Use state=absent to delete a Migration.
target_database_connection_id
string
The OCID of the Target Database Connection.
Required for create using state=present.
This parameter is updatable.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
type
string
    Choices:
  • ONLINE
  • OFFLINE
Migration type.
Required for create using state=present.
This parameter is updatable.
vault_details
dictionary
This parameter is updatable.
compartment_id
string
OCID of the compartment where the secret containing the credentials will be created.
This parameter is updatable.
key_id
string
OCID of the vault encryption key
This parameter is updatable.
vault_id
string
OCID of the vault
This parameter is updatable.
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Create migration
  oci_database_migration_migration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    type: ONLINE
    source_database_connection_id: "ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    target_database_connection_id: "ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    agent_id: "ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx"
    source_container_database_connection_id: "ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    data_transfer_medium_details:
      # optional
      database_link_details:
        # optional
        name: name_example
        wallet_bucket:
          # optional
          namespace_name: namespace_name_example
          bucket_name: bucket_name_example
      object_storage_details:
        # optional
        namespace_name: namespace_name_example
        bucket_name: bucket_name_example
      aws_s3_details:
        # optional
        name: name_example
        region: us-phoenix-1
        access_key_id: "ocid1.accesskey.oc1..xxxxxxEXAMPLExxxxxx"
        secret_access_key: secret_access_key_example
    dump_transfer_details:
      # optional
      source:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
      target:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
    datapump_settings:
      # optional
      job_mode: FULL
      data_pump_parameters:
        # optional
        is_cluster: true
        estimate: BLOCKS
        table_exists_action: TRUNCATE
        exclude_parameters: [ "exclude_parameters_example" ]
        import_parallelism_degree: 56
        export_parallelism_degree: 56
      metadata_remaps:
      - # required
        type: SCHEMA
        old_value: old_value_example
        new_value: new_value_example
      tablespace_details:
        # required
        target_type: NON_ADB_AUTOCREATE

        # optional
        is_auto_create: true
        is_big_file: true
        extend_size_in_mbs: 56
      export_directory_object:
        # optional
        name: name_example
        path: path_example
      import_directory_object:
        # optional
        name: name_example
        path: path_example
    advisor_settings:
      # optional
      is_skip_advisor: true
      is_ignore_errors: true
    exclude_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    include_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    golden_gate_details:
      # optional
      hub:
        # optional
        rest_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_container_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        target_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        url: url_example
        source_microservices_deployment_name: source_microservices_deployment_name_example
        target_microservices_deployment_name: target_microservices_deployment_name_example
        compute_id: "ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx"
      settings:
        # optional
        extract:
          # optional
          performance_profile: LOW
          long_trans_duration: 56
        replicat:
          # optional
          map_parallelism: 56
          min_apply_parallelism: 56
          max_apply_parallelism: 56
        acceptable_lag: 56
    vault_details:
      # optional
      compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
      vault_id: "ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx"
      key_id: "ocid1.key.oc1..xxxxxxEXAMPLExxxxxx"
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Update migration
  oci_database_migration_migration:
    # required
    migration_id: "ocid1.migration.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    type: ONLINE
    display_name: display_name_example
    agent_id: "ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx"
    source_database_connection_id: "ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    source_container_database_connection_id: "ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    target_database_connection_id: "ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    data_transfer_medium_details:
      # optional
      database_link_details:
        # optional
        name: name_example
        wallet_bucket:
          # optional
          namespace_name: namespace_name_example
          bucket_name: bucket_name_example
      object_storage_details:
        # optional
        namespace_name: namespace_name_example
        bucket_name: bucket_name_example
      aws_s3_details:
        # optional
        name: name_example
        region: us-phoenix-1
        access_key_id: "ocid1.accesskey.oc1..xxxxxxEXAMPLExxxxxx"
        secret_access_key: secret_access_key_example
    dump_transfer_details:
      # optional
      source:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
      target:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
    datapump_settings:
      # optional
      job_mode: FULL
      data_pump_parameters:
        # optional
        is_cluster: true
        estimate: BLOCKS
        table_exists_action: TRUNCATE
        exclude_parameters: [ "exclude_parameters_example" ]
        import_parallelism_degree: 56
        export_parallelism_degree: 56
      metadata_remaps:
      - # required
        type: SCHEMA
        old_value: old_value_example
        new_value: new_value_example
      tablespace_details:
        # required
        target_type: NON_ADB_AUTOCREATE

        # optional
        is_auto_create: true
        is_big_file: true
        extend_size_in_mbs: 56
      export_directory_object:
        # optional
        name: name_example
        path: path_example
      import_directory_object:
        # optional
        name: name_example
        path: path_example
    advisor_settings:
      # optional
      is_skip_advisor: true
      is_ignore_errors: true
    exclude_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    include_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    golden_gate_details:
      # optional
      hub:
        # optional
        rest_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_container_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        target_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        url: url_example
        source_microservices_deployment_name: source_microservices_deployment_name_example
        target_microservices_deployment_name: target_microservices_deployment_name_example
        compute_id: "ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx"
      settings:
        # optional
        extract:
          # optional
          performance_profile: LOW
          long_trans_duration: 56
        replicat:
          # optional
          map_parallelism: 56
          min_apply_parallelism: 56
          max_apply_parallelism: 56
        acceptable_lag: 56
    vault_details:
      # optional
      compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
      vault_id: "ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx"
      key_id: "ocid1.key.oc1..xxxxxxEXAMPLExxxxxx"
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Update migration using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_database_migration_migration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example

    # optional
    type: ONLINE
    agent_id: "ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx"
    source_database_connection_id: "ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    source_container_database_connection_id: "ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    target_database_connection_id: "ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx"
    data_transfer_medium_details:
      # optional
      database_link_details:
        # optional
        name: name_example
        wallet_bucket:
          # optional
          namespace_name: namespace_name_example
          bucket_name: bucket_name_example
      object_storage_details:
        # optional
        namespace_name: namespace_name_example
        bucket_name: bucket_name_example
      aws_s3_details:
        # optional
        name: name_example
        region: us-phoenix-1
        access_key_id: "ocid1.accesskey.oc1..xxxxxxEXAMPLExxxxxx"
        secret_access_key: secret_access_key_example
    dump_transfer_details:
      # optional
      source:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
      target:
        # required
        kind: OCI_CLI
        oci_home: oci_home_example
    datapump_settings:
      # optional
      job_mode: FULL
      data_pump_parameters:
        # optional
        is_cluster: true
        estimate: BLOCKS
        table_exists_action: TRUNCATE
        exclude_parameters: [ "exclude_parameters_example" ]
        import_parallelism_degree: 56
        export_parallelism_degree: 56
      metadata_remaps:
      - # required
        type: SCHEMA
        old_value: old_value_example
        new_value: new_value_example
      tablespace_details:
        # required
        target_type: NON_ADB_AUTOCREATE

        # optional
        is_auto_create: true
        is_big_file: true
        extend_size_in_mbs: 56
      export_directory_object:
        # optional
        name: name_example
        path: path_example
      import_directory_object:
        # optional
        name: name_example
        path: path_example
    advisor_settings:
      # optional
      is_skip_advisor: true
      is_ignore_errors: true
    exclude_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    include_objects:
    - # required
      owner: owner_example
      object_name: object_name_example

      # optional
      type: type_example
    golden_gate_details:
      # optional
      hub:
        # optional
        rest_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        source_container_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        target_db_admin_credentials:
          # optional
          username: username_example
          password: example-password
        url: url_example
        source_microservices_deployment_name: source_microservices_deployment_name_example
        target_microservices_deployment_name: target_microservices_deployment_name_example
        compute_id: "ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx"
      settings:
        # optional
        extract:
          # optional
          performance_profile: LOW
          long_trans_duration: 56
        replicat:
          # optional
          map_parallelism: 56
          min_apply_parallelism: 56
          max_apply_parallelism: 56
        acceptable_lag: 56
    vault_details:
      # optional
      compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
      vault_id: "ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx"
      key_id: "ocid1.key.oc1..xxxxxxEXAMPLExxxxxx"
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}

- name: Delete migration
  oci_database_migration_migration:
    # required
    migration_id: "ocid1.migration.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

- name: Delete migration using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_database_migration_migration:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
migration
complex
on success
Details of the Migration resource acted upon by the current operation

Sample:
{'advisor_settings': {'is_ignore_errors': True, 'is_skip_advisor': True}, 'agent_id': 'ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'credentials_secret_id': 'ocid1.credentialssecret.oc1..xxxxxxEXAMPLExxxxxx', 'data_transfer_medium_details': {'aws_s3_details': {'name': 'name_example', 'region': 'us-phoenix-1'}, 'database_link_details': {'name': 'name_example', 'wallet_bucket': {'bucket_name': 'bucket_name_example', 'namespace_name': 'namespace_name_example'}}, 'object_storage_details': {'bucket_name': 'bucket_name_example', 'namespace_name': 'namespace_name_example'}}, 'datapump_settings': {'data_pump_parameters': {'estimate': 'BLOCKS', 'exclude_parameters': [], 'export_parallelism_degree': 56, 'import_parallelism_degree': 56, 'is_cluster': True, 'table_exists_action': 'TRUNCATE'}, 'export_directory_object': {'name': 'name_example', 'path': 'path_example'}, 'import_directory_object': {'name': 'name_example', 'path': 'path_example'}, 'job_mode': 'FULL', 'metadata_remaps': [{'new_value': 'new_value_example', 'old_value': 'old_value_example', 'type': 'SCHEMA'}], 'tablespace_details': {'extend_size_in_mbs': 56, 'is_auto_create': True, 'is_big_file': True, 'remap_target': 'remap_target_example', 'target_type': 'ADB_S_REMAP'}}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'dump_transfer_details': {'source': {'kind': 'CURL', 'oci_home': 'oci_home_example'}, 'target': {'kind': 'CURL', 'oci_home': 'oci_home_example'}}, 'exclude_objects': [{'object_name': 'object_name_example', 'owner': 'owner_example', 'type': 'type_example'}], 'executing_job_id': 'ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx', 'freeform_tags': {'Department': 'Finance'}, 'golden_gate_details': {'hub': {'compute_id': 'ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx', 'rest_admin_credentials': {'username': 'username_example'}, 'source_container_db_admin_credentials': {'username': 'username_example'}, 'source_db_admin_credentials': {'username': 'username_example'}, 'source_microservices_deployment_name': 'source_microservices_deployment_name_example', 'target_db_admin_credentials': {'username': 'username_example'}, 'target_microservices_deployment_name': 'target_microservices_deployment_name_example', 'url': 'url_example'}, 'settings': {'acceptable_lag': 56, 'extract': {'long_trans_duration': 56, 'performance_profile': 'LOW'}, 'replicat': {'map_parallelism': 56, 'max_apply_parallelism': 56, 'min_apply_parallelism': 56}}}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'include_objects': [{'object_name': 'object_name_example', 'owner': 'owner_example', 'type': 'type_example'}], 'lifecycle_details': 'READY', 'lifecycle_state': 'CREATING', 'source_container_database_connection_id': 'ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'source_database_connection_id': 'ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'system_tags': {}, 'target_database_connection_id': 'ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx', 'time_created': '2013-10-20T19:20:30+01:00', 'time_last_migration': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'type': 'ONLINE', 'vault_details': {'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'key_id': 'ocid1.key.oc1..xxxxxxEXAMPLExxxxxx', 'vault_id': 'ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx'}, 'wait_after': 'ODMS_VALIDATE_TGT'}
 
advisor_settings
complex
on success

   
is_ignore_errors
boolean
on success
True to not interrupt migration execution due to Pre-Migration Advisor errors. Default is false.

Sample:
True
   
is_skip_advisor
boolean
on success
True to skip the Pre-Migration Advisor execution. Default is false.

Sample:
True
 
agent_id
string
on success
The OCID of the registered on-premises ODMS Agent. Only valid for Offline Migrations.

Sample:
ocid1.agent.oc1..xxxxxxEXAMPLExxxxxx
 
compartment_id
string
on success
OCID of the compartment

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
credentials_secret_id
string
on success
OCID of the Secret in the OCI vault containing the Migration credentials. Used to store GoldenGate administrator user credentials.

Sample:
ocid1.credentialssecret.oc1..xxxxxxEXAMPLExxxxxx
 
data_transfer_medium_details
complex
on success

   
aws_s3_details
complex
on success

     
name
string
on success
S3 bucket name.

Sample:
name_example
     
region
string
on success
AWS region code where the S3 bucket is located. Region code should match the documented available regions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions

Sample:
us-phoenix-1
    database_link_details
complex
on success

      name
string
on success
Name of database link from OCI database to on-premise database. ODMS will create link, if the link does not already exist.

Sample:
name_example
      wallet_bucket
complex
on success

        bucket_name
string
on success
Bucket name.

Sample:
bucket_name_example
        namespace_name
string
on success
Namespace name of the object store bucket.

Sample:
namespace_name_example
   
object_storage_details
complex
on success

     
bucket_name
string
on success
Bucket name.

Sample:
bucket_name_example
     
namespace_name
string
on success
Namespace name of the object store bucket.

Sample:
namespace_name_example
 
datapump_settings
complex
on success

   
data_pump_parameters
complex
on success

     
estimate
string
on success
Estimate size of dumps that will be generated.

Sample:
BLOCKS
     
exclude_parameters
list / elements=string
on success
Exclude paratemers for Export and Import.

     
export_parallelism_degree
integer
on success
Maximum number of worker processes that can be used for a Data Pump Export job.

Sample:
56
     
import_parallelism_degree
integer
on success
Maximum number of worker processes that can be used for a Data Pump Import job. For an Autonomous Database, ODMS will automatically query its CPU core count and set this property.

Sample:
56
     
is_cluster
boolean
on success
Set to false to force Data Pump worker processes to run on one instance.

Sample:
True
     
table_exists_action
string
on success
IMPORT: Specifies the action to be performed when data is loaded into a preexisting table.

Sample:
TRUNCATE
   
export_directory_object
complex
on success

     
name
string
on success
Name of directory object in database

Sample:
name_example
     
path
string
on success
Absolute path of directory on database server

Sample:
path_example
   
import_directory_object
complex
on success

     
name
string
on success
Name of directory object in database

Sample:
name_example
     
path
string
on success
Absolute path of directory on database server

Sample:
path_example
   
job_mode
string
on success
Data Pump job mode. Refer to Data Pump Export Modes

Sample:
FULL
   
metadata_remaps
complex
on success
Defines remapping to be applied to objects as they are processed. Refer to METADATA_REMAP Procedure

     
new_value
string
on success
Specifies the new value that oldValue should be translated into.

Sample:
new_value_example
     
old_value
string
on success
Specifies the value which needs to be reset.

Sample:
old_value_example
     
type
string
on success
Type of remap. Refer to METADATA_REMAP Procedure

Sample:
SCHEMA
   
tablespace_details
complex
on success

     
extend_size_in_mbs
integer
on success
Size of extend in MB. Can only be specified if 'isBigFile' property is set to true.

Sample:
56
     
is_auto_create
boolean
on success
True to auto-create tablespace in the target Database.

Sample:
True
     
is_big_file
boolean
on success
True set tablespace to big file.

Sample:
True
     
remap_target
string
on success
Name of tablespace at target to which the source database tablespace need to be remapped.

Sample:
remap_target_example
     
target_type
string
on success
Type of Database Base Migration Target.

Sample:
ADB_S_REMAP
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
Migration Display Name

Sample:
display_name_example
 
dump_transfer_details
complex
on success

   
source
complex
on success

     
kind
string
on success
Type of dump transfer to use during migration in source or target host. Default kind is CURL

Sample:
CURL
     
oci_home
string
on success
Path to the OCI CLI installation in the node.

Sample:
oci_home_example
   
target
complex
on success

     
kind
string
on success
Type of dump transfer to use during migration in source or target host. Default kind is CURL

Sample:
CURL
     
oci_home
string
on success
Path to the OCI CLI installation in the node.

Sample:
oci_home_example
 
exclude_objects
complex
on success
Database objects to exclude from migration. If 'includeObjects' are specified, only exclude object types can be specified with general wildcards (.*) for owner and objectName.

   
object_name
string
on success
Name of the object (regular expression is allowed)

Sample:
object_name_example
   
owner
string
on success
Owner of the object (regular expression is allowed)

Sample:
owner_example
   
type
string
on success
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.

Sample:
type_example
 
executing_job_id
string
on success
OCID of the current ODMS Job in execution for the Migration, if any.

Sample:
ocid1.executingjob.oc1..xxxxxxEXAMPLExxxxxx
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
golden_gate_details
complex
on success

   
hub
complex
on success

     
compute_id
string
on success
OCID of GoldenGate compute instance.

Sample:
ocid1.compute.oc1..xxxxxxEXAMPLExxxxxx
     
rest_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
source_container_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
source_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
source_microservices_deployment_name
string
on success
Name of GoldenGate deployment to operate on source database

Sample:
source_microservices_deployment_name_example
     
target_db_admin_credentials
complex
on success

       
username
string
on success
Administrator username

Sample:
username_example
     
target_microservices_deployment_name
string
on success
Name of GoldenGate deployment to operate on target database

Sample:
target_microservices_deployment_name_example
     
url
string
on success
Oracle GoldenGate hub's REST endpoint. Refer to https://docs.oracle.com/en/middleware/goldengate/core/19.1/securing/network.html#GUID-A709DA55-111D-455E-8942-C9BDD1E38CAA

Sample:
url_example
   
settings
complex
on success

     
acceptable_lag
integer
on success
ODMS will monitor GoldenGate end-to-end latency until the lag time is lower than the specified value in seconds.

Sample:
56
     
extract
complex
on success

       
long_trans_duration
integer
on success
Length of time (in seconds) that a transaction can be open before Extract generates a warning message that the transaction is long-running. If not specified, Extract will not generate a warning on long-running transactions.

Sample:
56
       
performance_profile
string
on success
Extract performance.

Sample:
LOW
     
replicat
complex
on success

       
map_parallelism
integer
on success
Number of threads used to read trail files (valid for Parallel Replicat)

Sample:
56
       
max_apply_parallelism
integer
on success
Defines the range in which Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)

Sample:
56
       
min_apply_parallelism
integer
on success
Defines the range in which Replicat automatically adjusts its apply parallelism (valid for Parallel Replicat)

Sample:
56
 
id
string
on success
The OCID of the resource

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
include_objects
complex
on success
Database objects to include from migration.

   
object_name
string
on success
Name of the object (regular expression is allowed)

Sample:
object_name_example
   
owner
string
on success
Owner of the object (regular expression is allowed)

Sample:
owner_example
   
type
string
on success
Type of object to exclude. If not specified, matching owners and object names of type TABLE would be excluded.

Sample:
type_example
 
lifecycle_details
string
on success
Additional status related to the execution and current state of the Migration.

Sample:
READY
 
lifecycle_state
string
on success
The current state of the Migration resource.

Sample:
CREATING
 
source_container_database_connection_id
string
on success
The OCID of the Source Container Database Connection.

Sample:
ocid1.sourcecontainerdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
source_database_connection_id
string
on success
The OCID of the Source Database Connection.

Sample:
ocid1.sourcedatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
system_tags
dictionary
on success
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`

 
target_database_connection_id
string
on success
The OCID of the Target Database Connection.

Sample:
ocid1.targetdatabaseconnection.oc1..xxxxxxEXAMPLExxxxxx
 
time_created
string
on success
The time the Migration was created. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_last_migration
string
on success
The time of last Migration. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time of the last Migration details update. An RFC3339 formatted datetime string.

Sample:
2013-10-20T19:20:30+01:00
 
type
string
on success
Migration type.

Sample:
ONLINE
 
vault_details
complex
on success

   
compartment_id
string
on success
OCID of the compartment where the secret containing the credentials will be created.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
   
key_id
string
on success
OCID of the vault encryption key

Sample:
ocid1.key.oc1..xxxxxxEXAMPLExxxxxx
   
vault_id
string
on success
OCID of the vault

Sample:
ocid1.vault.oc1..xxxxxxEXAMPLExxxxxx
 
wait_after
string
on success
Name of a migration phase. The Job will wait after executing this phase until the Resume Job endpoint is called.

Sample:
ODMS_VALIDATE_TGT


Authors

  • Oracle (@oracle)