steampipe plugin install oci

Table: oci_mysql_channel - Query OCI MySQL Channels using SQL

Oracle Cloud Infrastructure's MySQL Database Service is a fully managed database service that lets developers and database administrators build, deploy, run, and scale MySQL applications in the cloud. Channels in MySQL Database Service represent asynchronous replicas that use MySQL's native asynchronous replication to replicate data from a source MySQL DB System to a target MySQL DB System. They are used to increase data durability, support failover, and migrate data across different MySQL DB Systems.

Table Usage Guide

The oci_mysql_channel table provides insights into channels within Oracle Cloud Infrastructure's MySQL Database Service. As a database administrator, you can explore channel-specific details through this table, including the source and target endpoints, the replication status, and the last error message. Utilize it to uncover information about channels, such as those with replication errors, the status of data transfer between source and target MySQL DB Systems, and the configuration details of the channel.

Examples

Basic info

Explore the lifecycle state and creation time of your MySQL channels to understand their current status and longevity. This can be beneficial for assessing the health and stability of your database channels.

select
display_name,
id,
description,
lifecycle_state as state,
time_created
from
oci_mysql_channel;
select
display_name,
id,
description,
lifecycle_state as state,
time_created
from
oci_mysql_channel;

List disabled channels

Explore which MySQL channels are currently inactive. This query is useful for maintaining security and performance by identifying channels that are not enabled, allowing for necessary management actions.

select
display_name,
id,
description,
lifecycle_state as state,
time_created,
time_updated,
is_enabled
from
oci_mysql_channel
where
not is_enabled;
select
display_name,
id,
description,
lifecycle_state as state,
time_created,
time_updated,
is_enabled
from
oci_mysql_channel
where
not is_enabled;

Get target details for each channel

Identify the specific details for each channel, such as the applier's username, channel name, system ID, and target type, to gain insights into your MySQL Channel configuration and understand its operational aspects.

select
display_name,
id,
target ->> 'applierUsername' as applier_username,
target ->> 'channelName' as channel_name,
target ->> 'dbSystemId' as db_system_id,
target ->> 'targetType' as target_type
from
oci_mysql_channel;
select
display_name,
id,
json_extract(target, '$.applierUsername') as applier_username,
json_extract(target, '$.channelName') as channel_name,
json_extract(target, '$.dbSystemId') as db_system_id,
json_extract(target, '$.targetType') as target_type
from
oci_mysql_channel;

Schema for oci_mysql_channel

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
descriptiontextA user-supplied description of the backup.
display_nametext=The user-friendly name for the Channel. It does not have to be unique.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the Channel.
is_enabledboolean=Whether the Channel has been enabled by the user.
lifecycle_detailstextA message describing the state of the Channel.
lifecycle_statetext=The current state of the Channel.
regiontextThe OCI region in which the resource is located.
sourcejsonbParameters detailing how to provision the source for the given Channel.
tagsjsonbA map of tags for the resource.
targetjsonbParameters detailing how to provision the target for the given Channel.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe date and time the Channel was created.
time_updatedtimestamp with time zoneThe time the Channel was last updated.
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_mysql_channel