Skip to main content

data_guards

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

Overview​

Namedata_guards
TypeResource
Idoci.database.data_guards

Fields​

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
updateupdatedatabaseId, regionopc-retry-token, opc-request-id, if-matchUpdate an existing Data Guard member. A Data Guard member represents the replication relationship between the<br />specified database and a standby database. For more information, see [Using Oracle Data Guard](/Content/Database/Tasks/usingdataguard.htm).<br />
convert_to_standaloneexecdatabaseId, region, databaseAdminPasswordopc-retry-token, opc-request-id, if-matchDisassociate the standby database identified by the databaseId parameter from existing Data Guard group. <br /><br />Convert the standby to a standalone database. <br /><br />This operation should be performed on respective standby database.<br />
failover_data_guardexecdatabaseId, region, databaseAdminPasswordopc-retry-token, opc-request-id, if-matchPerforms a failover to transition the standby database identified by the databaseId path parameter into the<br />primary role after the existing primary database fails or becomes unreachable.<br /><br />A failover might result in data loss depending on the protection mode in effect at the time of the primary<br />database failure.<br /><br />This operation should be performed on respective standby database.<br />
reinstate_data_guardexecdatabaseId, region, databaseAdminPassword, sourceDatabaseIdopc-retry-token, opc-request-id, if-matchReinstates the database identified by the databaseId parameter into the standby role in a Data Guard association. <br /><br />This operation should be performed on disabled standby database.<br />
switch_over_data_guardexecdatabaseId, region, databaseAdminPasswordopc-retry-token, opc-request-id, if-matchPerforms a switchover to transition primary database of this Data Guard association into a standby role. The<br />standby database associated with the dataGuardAssociationId assumes the primary database role.<br /><br />A switchover guarantees no data loss.<br /><br />This operation should be performed on respective standby database.<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
databaseIdstringThe database [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)
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.
opc-request-idstringUnique identifier for the request.
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).

UPDATE examples​

Update an existing Data Guard member. A Data Guard member represents the replication relationship between the<br />specified database and a standby database. For more information, see [Using Oracle Data Guard](/Content/Database/Tasks/usingdataguard.htm).<br />

UPDATE oci.database.data_guards
SET
databaseAdminPassword = '{{ databaseAdminPassword }}',
isActiveDataGuardEnabled = {{ isActiveDataGuardEnabled }},
protectionMode = '{{ protectionMode }}',
transportType = '{{ transportType }}'
WHERE
databaseId = '{{ databaseId }}' --required
AND region = '{{ region }}' --required
AND opc-retry-token = '{{ opc-retry-token}}'
AND opc-request-id = '{{ opc-request-id}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
characterSet,
compartmentId,
connectionStrings,
dataGuardGroup,
databaseManagementConfig,
databaseSoftwareImageId,
dbBackupConfig,
dbHomeId,
dbName,
dbSystemId,
dbUniqueName,
dbWorkload,
definedTags,
encryptionKeyLocationDetails,
freeformTags,
homeType,
isCdb,
kmsKeyId,
kmsKeyVersionId,
lastBackupDurationInSeconds,
lastBackupTimestamp,
lastFailedBackupTimestamp,
lifecycleDetails,
lifecycleState,
managedSoftwareUpdateDetails,
ncharacterSet,
pdbName,
sidPrefix,
sourceDatabasePointInTimeRecoveryTimestamp,
storageSizeDetails,
systemTags,
timeCreated,
vaultId,
vmClusterId;

Lifecycle Methods​

Disassociate the standby database identified by the databaseId parameter from existing Data Guard group. <br /><br />Convert the standby to a standalone database. <br /><br />This operation should be performed on respective standby database.<br />

EXEC oci.database.data_guards.convert_to_standalone
@databaseId='{{ databaseId }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}',
@if-match='{{ if-match }}'
@@json=
'{
"databaseAdminPassword": "{{ databaseAdminPassword }}"
}'
;