Review Status and Complete Migration

As part of the Analyze section of the Database Migration work cycle, you can review completed migrations to verify any errors or warnings. When satisfied with the migration results you can also mark migrations as Complete.

Follow these steps to review errors and warnings that might have come up during a migration using the Database Migration Workbench:
  1. Navigate to the Migration Activities Dashboard.
  2. Locate a recently completed Migration Activity you wish to review within the Migration Activity table. You can further filter migration activities by clicking on the different Migration Activities statuses:
    • All: Shows all migrations including scheduled and in progress migrations.
    • Completed: Shows all migrations that successfully completed. These will be marked as completed.
    • Problems: Shows migrations that completed with errors.
    • Warnings: Shows migrations that completed with warnings.
  3. Click on the specific Migration Activity name under Activity to see the migration details. In the Procedure Activity screen review the procedure steps to review errors, warnings and skipped steps. When the review is complete return to the previous screen.
  4. On the Migration Activities Dashboard click on the left hand navigation menu specific to the reviewed activity, select Mark as Completed enter a comment in the pop up and click Yes. The Status of the Migration Activity will now show a blue check mark.
.

Review Status of a Migration in REST API and EM CLI

To review the status of all current activities use the following REST:

Note:

POST can be used if user wants the OMS to pull the files from the Host. The Host needs to be discovered in Enterprise Manager.
Request Method
POST
URI
/em/websvcs/restful/db/migration
Headers
Content-Type: application/json
Authorization: Basic
Payload
{
    "action": "LIST_ACTIVITIES", 
    "targetName": "<Source target/Destination database>",
    "targetType": "<Target type of the database>"
	"filters": {
		"activityStatus": "ALL | IN_PROGRESS | PROBLEM | SCHEDULED | COMPLETED"
		"timePeriod": "<startTimestamp>", "<endTimestamp>"
	}
}
The generated Response will be like the following example:
}  
    "statusCode": 200,
    "activities": [
       {
        "instanceGuid": "B07C1E3035C725F5E0538052F20A290C",
        "executionGuid": "B07C1E3035CA25F5E0538052F20A290C",
        "lastUpdated": 1601418294000,
        "sourceTargetType": "sample_pdb",
        "sourceTargetName": "CDBSample.example.com_DB2",
        "destTargetType": "oracle_cloud_atp",
        "destTargetName": "ATPD_USER",
        "createdBy": "SYSMAN",
        "instanceName": "Database Migration Tue Sep 29 2020 14:34:38 PDT",
        "elapsedTime": "4 minutes, 57 seconds",
        "status": {
           "code": 9,
           "displayName": "Completed (with errors)",
           "name": "COMPLETED_WITH_ERRORS"
        },
        "completed": 1601418294000,
        "sourceDisplayName": "CDBSample.example.com_DB2",
        "destDisplayName": "ATPD_USER",
        "hasChildActivities": true,
        "started": 1601417997000,
        "action": "MIGRATE"
      } ......
    ],
    "summary": {
    "all": 3,
    "in_progress": 0,
    "problem": 0,
    "scheduled": 0,
    "warning": 2,
    "completed": 1
  }
}
To check the status of a specific activity use the following REST:
Request Method
POST
URI
/em/websvcs/restful/db/migration
Header
Content-Type: application/json
Authorization: Basic
{
    "action": "VALIDATION_RESULTS", 
    "executionId": "<Execution_ID>"
}
The generated Response will be a summary of the specific Migration Activity giving you a status of Failed, Completed with Errors or Completed and the specific details for each step.
To view the status of a migration in EMCLI use the following command:
emcli migrate_db 
-file="/home/migrations/Analyze_Migration.json"
Where the Analyze_Migration file contains the following JSON payload format to review a list of activities:
{
    "action": "LIST_ACTIVITIES", 
    "targetName": "<Source target/Destination database>",
    "targetType": "<Target type of the database>"
	"filters": {
		"activityStatus": "ALL | IN_PROGRESS | PROBLEM | SCHEDULED | COMPLETED"
		"timePeriod": "<startTimestamp>", "<endTimestamp>"
	}
}
Or where the Analyze_Migration file contains the following JSON payload format to review a specific activity:
{
    "action": "VALIDATION_RESULTS", 
    "executionId": "<Execution_ID>"
}