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_createdfrom oci_mysql_channel;
select display_name, id, description, lifecycle_state as state, time_createdfrom 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_enabledfrom oci_mysql_channelwhere not is_enabled;
select display_name, id, description, lifecycle_state as state, time_created, time_updated, is_enabledfrom oci_mysql_channelwhere 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_typefrom 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_typefrom oci_mysql_channel;
Query examples
Schema for oci_mysql_channel
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
defined_tags | jsonb | Defined 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. | |
description | text | A user-supplied description of the backup. | |
display_name | text | = | The user-friendly name for the Channel. It does not have to be unique. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the Channel. |
is_enabled | boolean | = | Whether the Channel has been enabled by the user. |
lifecycle_details | text | A message describing the state of the Channel. | |
lifecycle_state | text | = | The current state of the Channel. |
region | text | The OCI region in which the resource is located. | |
source | jsonb | Parameters detailing how to provision the source for the given Channel. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
target | jsonb | Parameters detailing how to provision the target for the given Channel. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the Channel was created. | |
time_updated | timestamp with time zone | The time the Channel was last updated. | |
title | text | Title 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