migrate_db

Migration Workbench

Migrate databases using the Oracle recommended method Database Migration Workbench, these can be performed via Data Pump or Transportable Tablespace.

For more information on using migrate_db for a Migration Workbench activity see: Migration Workbench Migrate EMCLI in Oracle Enterprise Manager Database Migration Workbench Guide.

Format
emcli migrate_db
-file=<JSON file path>
Options
  • file

    Absolute path of the JSON file containing source and destination database mapping.

Example

Migrate a database

emcli migrate_db 
-file=/home/db_migration_input.json

Classic Migration

Tip:

Oracle recommends the use of Migration Workbench instead of Classic Workflow.
Description
Perform database consolidation using the classic workflow, can be used for the following methods:
  • Data Guard Physical Standby (minimal downtime)
  • Full Transportable Export and Import (minimal downtime, cross-platform)
Format
emcli migrate_db
      -file=<XML file path>
      [-exec_mode=<execution mode>]
      [-ignore_pre_req]

[ ]  indicates that the parameter is optional.
Options
  • file

    Absolute path of the XML or JSON file containing source and destination database mapping. Run the get_sample_migration_xml verb to create a sample XML input file

  • exec_mode

    Use only when migration method is ONLINE_DATAGUARD, as follows:

    • FULL: execute all migration steps in the same job, with no user control over downtime. For example, execute the database standby, convert to RAC, and standby switchover steps in the same job.
    • PRE_DOWNTIME: execute all steps that do not require the database to be down. For example, execute the database standby and convert to RAC steps in the same job.

      When you use this mode, you must run the migration job again after successful completion of the current job, with the same input file and exec_mode option DOWNTIME.

    • DOWNTIME: execute all steps that require downtime. For example, execute the switchover step in the job.

      Using this mode presupposes that all pre-downtime steps were successfully executed in a job that specified the PRE_DOWNTIME exec_mode option.

    If exec_mode is unspecified, defaults to FULL.

  • ignore_pre_req

    Ignores all prerequisite checks on the input.

Examples

Example 1

The following example deploys a procedure to perform a database migration, based on the mappings specified in the dgpredt-migrate.xml file. The job uses no defined execution mode, of the method is ONLINE_DATAGUARD the mode defaults to FULL

emcli migrate_db 
      -file="/home/migrations/dgpredt-migrate.xml"

Example 2

The following example deploys a procedure to perform a database migration, based on the mappings specified in the dgpredt-migrate.xml file. The job uses the Data Guard migration method in which it will execute all steps that do not require database downtime.

emcli migrate_db 
      -file="/home/migrations/dgpredt-migrate.xml"
      -exec_mode="PRE_DOWNTIME"

Example 3

The following example deploys a procedure to perform a database migration, based on the mappings specified in the dgdt-migrate.xml file. The job uses the Data Guard migration method in which it will execute all steps that require database downtime. In addition, there will be no prerequisite validation of the XML.

emcli migrate_db 
      -file="/home/migrations/dgdt-migrate.xml"
      -exec_mode="DOWNTIME"
   

Example 4

The following example deploys a procedure to perform a database migration, based on the mappings specified in the dgdt-migrate.xml file. The job uses no specified execution mode and will ignore all prerequisites checks.

emcli migrate_db 
      -file="/home/migrations/dgdt-migrate.xml"
      -ignore_pre_req