Skip to main content

db_nodes

Creates, updates, deletes, gets or lists a db_nodes resource.

Overview​

Namedb_nodes
TypeResource
Idoci.database.db_nodes

Fields​

The following fields are returned by SELECT queries:

The database node information is retrieved.

NameDatatypeDescription
idstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the database node.
additionalDetailsstringAdditional information about the planned maintenance.
backupIpIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the backup IP address associated with the database node. Use this OCID with either the [GetPrivateIp](#/en/iaas/20160918/PrivateIp/GetPrivateIp) or the [GetPublicIpByPrivateIpId](#/en/iaas/20160918/PublicIp/GetPublicIpByPrivateIpId) API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
backupVnic2IdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the second backup VNIC. Note: Applies only to Exadata Cloud Service.
backupVnicIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the backup VNIC.
computeCountinteger (int32)The number of compute servers for the DB system.
computeModelstringThe compute model for Base Database Service. This is required if using the computeCount parameter. If using cpuCoreCount then it is an error to specify computeModel to a non-null value. The ECPU compute model is the recommended model, and the OCPU compute model is legacy. (ECPU, OCPU)
cpuCoreCountintegerThe number of CPU cores enabled on the Db node.
dbNodeStorageSizeInGBsintegerThe allocated local node storage in GBs on the Db node.
dbServerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the Exacc Db server associated with the database node.
dbSystemIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the DB system.
faultDomainstringThe name of the Fault Domain the instance is contained in.
hostIpIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the host IP address associated with the database node. Use this OCID with either the [GetPrivateIp](#/en/iaas/20160918/PrivateIp/GetPrivateIp) or the [GetPublicIpByPrivateIpId](#/en/iaas/20160918/PublicIp/GetPublicIpByPrivateIpId) API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
hostnamestringThe host name for the database node.
isForceActionInProgressbooleanIndicates whether the node is in the process of being forcefully stopped or rebooted.
isOsPatchRebootRequiredbooleanIndicates whether the database node must be rebooted after applying Operating System patches. This flag becomes true after operations such as OS/kernel updates to indicate that a reboot of the node is required. After a successful reboot, this value is expected to return to false.
lifecycleStatestringThe current state of the database node. (PROVISIONING, AVAILABLE, UPDATING, STOPPING, STOPPED, STARTING, TERMINATING, TERMINATED, FAILED)
maintenanceTypestringThe type of database node maintenance. (VMDB_REBOOT_MIGRATION, EXADBXS_REBOOT_MIGRATION)
memorySizeInGBsintegerThe allocated memory in GBs on the Db node.
softwareStorageSizeInGBintegerThe size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
timeCreatedstring (date-time)The date and time that the database node was created.
timeMaintenanceWindowEndstring (date-time)End date and time of maintenance window.
timeMaintenanceWindowStartstring (date-time)Start date and time of maintenance window.
totalCpuCoreCountintegerThe total number of CPU cores reserved on the Db node.
vnic2IdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the second VNIC. Note: Applies only to Exadata Cloud Service.
vnicIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the VNIC.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdbNodeId, regionGets information about the specified database node.
listselectcompartmentId, regiondbSystemId, vmClusterId, limit, page, sortBy, sortOrder, lifecycleState, dbServerIdLists the database nodes in the specified DB system and compartment. In addition to the other required parameters, either '--db-system-id' or '--vm-cluster-id' also must be provided, depending on the service being accessed.<br />
db_node_actionexecdbNodeId, action, regionopc-retry-token, if-matchPerforms one of the following power actions on the specified DB node:<br />- start - power on<br />- stop - power off gracefully<br />- forcestop - power off forcefully<br />- forcereset - ACPI shutdown and power on forcefully<br />- softreset - ACPI shutdown and power on<br />- reset - power off and power on<br /><br />Note: Stopping a node affects billing differently, depending on the type of DB system:<br />Bare metal and Exadata systems - The stop state has no effect on the resources you consume.<br />Billing continues for DB nodes that you stop, and related resources continue<br />to apply against any relevant quotas. You must terminate the DB system<br />([TerminateDbSystem](#/en/database/latest/DbSystem/TerminateDbSystem))<br />to remove its resources from billing and quotas.<br />Virtual machine DB systems - Stopping a node stops billing for all OCPUs associated with that node, and billing resumes when you restart the node.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
actionstringThe action to perform on the DB Node.
compartmentIdstringThe compartment [OCID](/Content/General/Concepts/identifiers.htm).
dbNodeIdstringThe database node [OCID](/Content/General/Concepts/identifiers.htm).
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
dbServerIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the Exacc Db server.
dbSystemIdstringThe DB system [OCID](/Content/General/Concepts/identifiers.htm). If provided, filters the results to the set of database versions which are supported for the DB system.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
lifecycleStatestringA filter to return only resources that match the given lifecycle state exactly.
limitintegerThe maximum number of items to return per page.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringThe pagination token to continue listing from.
sortBystringSort by TIMECREATED. Default order for TIMECREATED is descending.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC).
vmClusterIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the VM cluster.

SELECT examples​

Gets information about the specified database node.

SELECT
id,
additionalDetails,
backupIpId,
backupVnic2Id,
backupVnicId,
computeCount,
computeModel,
cpuCoreCount,
dbNodeStorageSizeInGBs,
dbServerId,
dbSystemId,
faultDomain,
hostIpId,
hostname,
isForceActionInProgress,
isOsPatchRebootRequired,
lifecycleState,
maintenanceType,
memorySizeInGBs,
softwareStorageSizeInGB,
timeCreated,
timeMaintenanceWindowEnd,
timeMaintenanceWindowStart,
totalCpuCoreCount,
vnic2Id,
vnicId
FROM oci.database.db_nodes
WHERE dbNodeId = '{{ dbNodeId }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods​

Performs one of the following power actions on the specified DB node:<br />- start - power on<br />- stop - power off gracefully<br />- forcestop - power off forcefully<br />- forcereset - ACPI shutdown and power on forcefully<br />- softreset - ACPI shutdown and power on<br />- reset - power off and power on<br /><br />Note: Stopping a node affects billing differently, depending on the type of DB system:<br />Bare metal and Exadata systems - The stop state has no effect on the resources you consume.<br />Billing continues for DB nodes that you stop, and related resources continue<br />to apply against any relevant quotas. You must terminate the DB system<br />([TerminateDbSystem](#/en/database/latest/DbSystem/TerminateDbSystem))<br />to remove its resources from billing and quotas.<br />Virtual machine DB systems - Stopping a node stops billing for all OCPUs associated with that node, and billing resumes when you restart the node.<br />

EXEC oci.database.db_nodes.db_node_action
@dbNodeId='{{ dbNodeId }}' --required,
@action='{{ action }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@if-match='{{ if-match }}'
;