steampipe plugin install oci

Table: oci_application_migration_migration - Query OCI Application Migration Service Migrations using SQL

Oracle Cloud Infrastructure's Application Migration Service simplifies the migration of applications from on-premise data centers or other clouds to Oracle Cloud Infrastructure. It supports a wide range of source applications, including Java EE, Oracle WebLogic Server, Oracle SOA Suite, and more. The service provides a comprehensive solution for migrating applications, databases, and associated configurations.

Table Usage Guide

The oci_application_migration_migration table provides insights into the migrations performed using Oracle Cloud Infrastructure's Application Migration Service. As a cloud engineer or database administrator, you can explore migration-specific details through this table, including migration status, type of source application, and associated metadata. Utilize it to monitor the progress of migrations, identify any issues, and ensure successful migration of applications to Oracle Cloud Infrastructure.

Examples

Basic info

Explore the status and details of your application migrations to understand their progress and configuration. This can help in managing and tracking the migration process effectively.

select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration;
select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration;

List all inactive migrations

Discover the segments that consist of inactive migrations in your application to better manage resources and prioritize tasks. This can be particularly useful in maintaining efficiency and ensuring smooth operations within your system.

select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
lifecycle_state <> 'ACTIVE';
select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
lifecycle_state <> 'ACTIVE';

List all migrations created in the last 30 days

Identify recent application migrations within the past month. This can provide insights into the migration trends and help in assessing the migration workload.

select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
time_created >= now() - interval '30' day;
select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
time_created >= datetime('now', '-30 day');

List source details of a particular migration

This query helps in assessing the details of a specific migration source in an application migration scenario. It's useful when you need to understand the lifecycle, account details, and regional information of the source associated with a particular migration.

select
m.id as migration_id,
m.display_name as migration_name,
s.id as source_id,
s.display_name as source_name,
s.lifecycle_details,
s.lifecycle_state as state,
s.source_details ->> 'computeAccount' as source_account_name,
s.source_details ->> 'region' as source_account_region,
s.source_details ->> 'type' as source_account_type
from
oci_application_migration_source as s,
oci_application_migration_migration as m
where
s.id = m.source_id
and m.display_name = 'migration-1';
select
m.id as migration_id,
m.display_name as migration_name,
s.id as source_id,
s.display_name as source_name,
s.lifecycle_details,
s.lifecycle_state as state,
json_extract(s.source_details, '$.computeAccount') as source_account_name,
json_extract(s.source_details, '$.region') as source_account_region,
json_extract(s.source_details, '$.type') as source_account_type
from
oci_application_migration_source as s,
oci_application_migration_migration as m
where
s.id = m.source_id
and m.display_name = 'migration-1';

List successfully migrated applications

Discover the segments that have successfully migrated applications in your OCI environment. This can help you track your migration progress and ensure that all applications have been transferred correctly.

select
id as migration_id,
display_name as migration_name,
application_config,
application_name,
application_type
from
oci_application_migration_migration
where
migration_state = 'MIGRATION_SUCCEEDED';
select
id as migration_id,
display_name as migration_name,
application_config,
application_name,
application_type
from
oci_application_migration_migration
where
migration_state = 'MIGRATION_SUCCEEDED';

List application migrations that have selective-migration enabled

Determine the areas in which applications have selective migration enabled. This query is useful for understanding which applications are set to migrate only specific parts, allowing for targeted and efficient migration processes.

select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
is_selective_migration;
select
id,
display_name,
description,
source_id,
application_name,
application_type,
pre_created_target_database_type,
is_selective_migration,
service_config,
application_config,
lifecycle_details,
migration_state,
lifecycle_state as state
from
oci_application_migration_migration
where
is_selective_migration;

Schema for oci_application_migration_migration

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
application_configjsonbConfiguration required to migrate the application. In addition to the key and value, additional fields are provided.
application_nametextName of the application which is being migrated. This is the name of the application in the source environment.
application_typetextThe type of application being migrated.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for this resource. Each key is predefined and scoped to a namespace.
descriptiontextDescription of the migration.
display_nametext=User-friendly name of the migration.
freeform_tagsjsonbFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
idtext=The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the migration.
is_selective_migrationbooleanIf set to `true`, Application Migration migrates only the application resources that you specify. If set to `false`, Application Migration migrates the entire application. When you migrate the entire application, all the application resources are migrated to the target environment. You can selectively migrate resources only for the Oracle Integration Cloud and Oracle Integration Cloud Service applications.
lifecycle_detailstextDetails about the current lifecycle state of the migration.
lifecycle_statetext=The current state of the migration.
migration_statetextThe current state of the overall migration process.
pre_created_target_database_typetextThe pre-existing database type to be used in this migration. Currently, Application migration only supports Oracle Cloud.
service_configjsonbConfiguration required to migrate the application. In addition to the key and value, additional fields are provided.
source_idtextThe OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source with which this migration is associated.
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
time_createdtimestamp with time zoneTime that Migration was created.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_application_migration_migration