steampipe plugin install oci

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_created
from
oci_database_db;
select
db_name,
id,
lifecycle_state,
time_created
from
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_created
from
oci_database_db
where
lifecycle_state <> 'AVAILABLE';
select
db_name,
id,
lifecycle_state,
time_created
from
oci_database_db
where
lifecycle_state <> 'AVAILABLE';

Schema for oci_database_db

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
character_settextThe character set for the database.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
connection_stringsjsonbThe connection strings used to connect to the oracle database.
database_management_configjsonbThe configuration of the Database Management service.
database_software_image_idtextThe database software image OCID.
db_backup_configjsonbDatabase backup configuration details.
db_home_idtextThe OCID of the database home.
db_nametext=The database name.
db_system_idtextThe OCID of the DB system.
db_unique_nametextA system-generated name for the database to ensure uniqueness within an oracle data guard group.
db_workloadtextThe database workload type.
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.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the database.
is_cdbbooleanSpecifies a prefix for the Oracle SID of the database to be created.
kms_key_idtextThe OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
kms_key_version_idtextThe OCID of the key container version used in TDE operations.
last_backup_timestamptimestamp with time zoneThe date and time when the latest database backup was created.
lifecycle_detailstextAdditional information about the current lifecycle state.
lifecycle_statetext=The current state of the database.
ncharacter_settextThe national character set for the database.
pdb_nametextThe name of the pluggable database.
regiontextThe OCI region in which the resource is located.
sid_prefixtextSpecifies a prefix for the Oracle SID of the database to be created.
source_database_point_in_time_recovery_timestamptimestamp with time zonePoint in time recovery timeStamp of the source database at which cloned database system is cloned from the source database system.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The 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 database was created.
titletextTitle of the resource.
vault_idtextThe OCID of the Oracle Cloud Infrastructure vault.
vm_cluster_idtextThe 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