Table: oci_mysql_db_system - Query OCI MySQL Database Systems using SQL
A MySQL Database System is a managed service provided by Oracle Cloud Infrastructure (OCI) that makes it easy to set up, operate, and scale MySQL deployments in the cloud. It offers cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.
Table Usage Guide
The oci_mysql_db_system
table provides insights into MySQL Database Systems within Oracle Cloud Infrastructure (OCI). As a Database Administrator, you can explore system-specific details through this table, including configurations, network settings, and associated metadata. Utilize it to uncover information about systems, such as their current lifecycle state, the associated configurations, and the details of the subnet in which the system resides.
Examples
Basic info
Explore the lifecycle status and creation date of your MySQL database systems to understand their operational state and longevity. This can be useful in managing and assessing the overall health of your databases.
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_system;
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_system;
List DB systems that are not active
Discover the segments that consist of DB systems that are not currently active. This is useful in identifying and managing inactive resources within your MySQL database.
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_systemwhere lifecycle_state <> 'ACTIVE';
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_systemwhere lifecycle_state <> 'ACTIVE';
List DB systems with backups not enabled
Discover the segments that have active database systems without backup enabled, enabling you to identify potential vulnerabilities and risks in your data management. This is crucial for maintaining data integrity and implementing disaster recovery plans.
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_systemwhere lifecycle_state = 'ACTIVE' and backup_policy -> 'isEnabled' <> 'true';
select id, display_name, lifecycle_state as state, time_createdfrom oci_mysql_db_systemwhere lifecycle_state = 'ACTIVE' and json_extract(backup_policy, '$.isEnabled') <> 'true';
List the CPU and RAM configuration of DB systems
Explore the active DB systems to analyze their processing and memory capabilities. This helps in understanding the hardware resource allocation, supporting efficient system management and performance optimization.
select id, display_name, lifecycle_state as state, cpu_core_count, memory_size_in_gbsfrom oci_mysql_db_systemwhere lifecycle_state = 'ACTIVE';
select id, display_name, lifecycle_state as state, cpu_core_count, memory_size_in_gbsfrom oci_mysql_db_systemwhere lifecycle_state = 'ACTIVE';
Query examples
- mysql_configurations_for_mysql_db_system
- mysql_db_system_1_year
- mysql_db_system_24_hrs
- mysql_db_system_30_days
- mysql_db_system_365_days
- mysql_db_system_90_days
- mysql_db_system_age_report
- mysql_db_system_analytics_cluster_attached_count
- mysql_db_system_backup
- mysql_db_system_backup_disabled_count
- mysql_db_system_backup_policy
- mysql_db_system_by_compartment
- mysql_db_system_by_creation_month
- mysql_db_system_by_region
- mysql_db_system_by_tenancy
- mysql_db_system_count
- mysql_db_system_heat_wave_cluster_attached_count
- mysql_db_system_input
- mysql_db_system_mysql_version
- mysql_db_system_overview
- mysql_db_system_storage_by_compartment
- mysql_db_system_storage_by_creation_month
- mysql_db_system_storage_by_region
- mysql_db_system_storage_by_tenancy
- mysql_db_system_storage_total
- mysql_db_system_tag
- vcn_subnets_for_mysql_db_system
- vcn_vcns_for_mysql_db_system
Schema for oci_mysql_db_system
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
analytics_cluster | jsonb | A summary of an Analytics Cluster. | |
availability_domain | text | The Availability Domain where the primary DB System should be located. | |
backup_policy | jsonb | BackupPolicy The Backup policy for the DB System. | |
channels | jsonb | A list with a summary of all the Channels attached to the DB System. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
configuration_id | text | = | The OCID of the Configuration to be used for Instances in this DB System. |
cpu_core_count | bigint | The number of CPU Cores the Instance provides. These are OCPU's. | |
data_storage_size_in_gbs | bigint | Initial size of the data volume in GiBs that will be created and attached. | |
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 | User-provided data about the DB System. | |
display_name | text | = | The user-friendly name for the DB System. It does not have to be unique. |
endpoints | jsonb | The network endpoints available for this DB System. | |
fault_domain | text | The name of the fault domain the DB System is located in. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
hostname_label | text | The hostname for the primary endpoint of the DB System. | |
id | text | = | The OCID of the DB System. |
ip_address | inet | The IP address the DB System is configured to listen on. | |
is_analytics_cluster_attached | boolean | = | If the DB System has an Analytics Cluster attached. |
is_heat_wave_cluster_attached | boolean | = | Whether the DB System has a HeatWave cluster attached. |
lifecycle_details | text | Additional information about the current lifecycleState. | |
lifecycle_state | text | = | The current state of the DB System. |
maintenance | jsonb | The Maintenance Policy for the DB System. | |
memory_size_in_gbs | bigint | The amount of RAM the Instance provides. This is an IEC base-2 number. | |
mysql_version | text | Name of the MySQL Version in use for the DB System. | |
port | bigint | The port for primary endpoint of the DB System to listen on. | |
port_x | bigint | The network port on which X Plugin listens for TCP/IP connections. This is the X Plugin equivalent of port. | |
region | text | The OCI region in which the resource is located. | |
shape_name | text | The shape of the primary instances of the DB System. | |
source | jsonb | DbSystemSource Parameters detailing how to provision the initial data of the DB System. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subnet_id | text | The OCID of the subnet the DB System is associated with. | |
tags | jsonb | A map of tags for the resource. | |
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 DB System was created. | |
time_updated | timestamp with time zone | The time the DB System 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_db_system