Table: oci_database_db - Query OCI Database DBs using SQL
Oracle Cloud Infrastructure (OCI) Database service provides a fully managed, scalable, and highly available database solution. It supports a variety of database workloads, including Online Transaction Processing (OLTP), data warehousing (DW), and mixed workloads (OLTP and DW). The service is built on Oracle Exadata Database Machine, ensuring high performance and availability.
Table Usage Guide
The oci_database_db
table provides insights into databases within Oracle Cloud Infrastructure (OCI) Database service. As a database administrator, explore database-specific details through this table, including the lifecycle state, database name, and associated metadata. Utilize it to uncover information about databases, such as those in a terminated state, the relationships between databases, and the verification of database configurations.
Examples
Basic info
Explore which databases are active or inactive by assessing their lifecycle state and when they were created. This information can be useful in managing and maintaining your database resources effectively.
select db_name, id, lifecycle_state, time_createdfrom oci_database_db;
select db_name, id, lifecycle_state, time_createdfrom oci_database_db;
List databases that are not available
Discover the databases that are not currently available. This is useful in identifying potential issues or maintenance requirements within your database system.
select db_name, id, lifecycle_state, time_createdfrom oci_database_dbwhere lifecycle_state <> 'AVAILABLE';
select db_name, id, lifecycle_state, time_createdfrom oci_database_dbwhere lifecycle_state <> 'AVAILABLE';
Schema for oci_database_db
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
character_set | text | The character set for the database. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
connection_strings | jsonb | The connection strings used to connect to the oracle database. | |
database_management_config | jsonb | The configuration of the Database Management service. | |
database_software_image_id | text | The database software image OCID. | |
db_backup_config | jsonb | Database backup configuration details. | |
db_home_id | text | The OCID of the database home. | |
db_name | text | = | The database name. |
db_system_id | text | The OCID of the DB system. | |
db_unique_name | text | A system-generated name for the database to ensure uniqueness within an oracle data guard group. | |
db_workload | text | The database workload type. | |
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. | |
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 database. |
is_cdb | boolean | Specifies a prefix for the Oracle SID of the database to be created. | |
kms_key_id | text | The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. | |
kms_key_version_id | text | The OCID of the key container version used in TDE operations. | |
last_backup_timestamp | timestamp with time zone | The date and time when the latest database backup was created. | |
lifecycle_details | text | Additional information about the current lifecycle state. | |
lifecycle_state | text | = | The current state of the database. |
ncharacter_set | text | The national character set for the database. | |
pdb_name | text | The name of the pluggable database. | |
region | text | The OCI region in which the resource is located. | |
sid_prefix | text | Specifies a prefix for the Oracle SID of the database to be created. | |
source_database_point_in_time_recovery_timestamp | timestamp with time zone | Point in time recovery timeStamp of the source database at which cloned database system is cloned from the source database system. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
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 database was created. | |
title | text | Title of the resource. | |
vault_id | text | The OCID of the Oracle Cloud Infrastructure vault. | |
vm_cluster_id | text | The OCID of the vm cluster. |
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_database_db