Using the API to Manage Protected Databases

Review the list of REST API endpoints to manage protected databases.

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface

Use the following REST API endpoints to manage protected databases.

Performing a Dry Run to Check the Preparedness for Creating a Protected Database

When you run the CreateProtectedDatabase API with the opc-dry-run option set as TRUE, it indicates that the request is a dry run to check for any missing prerequisites before creating a protected database. During a dry-run, the CreateProtectedDatabase API returns error messages to warn you about any missing requirements, without actually creating a protected database. If an error occurs, you can review, correct, and repeat the dry-run until the CreateProtectedDatabase request does not return any errors.

These are the common issues that you can identify by performing a dry run of the CreateProtectedDatabase API:

Example 11-1 Dry Run Request of the CreateProtectedDatabase API

This example is a sample dry run request.

CreateProtectedDatabaseRequest createProtectedDatabaseRequest = CreateProtectedDatabaseRequest.builder()
.createProtectedDatabaseDetails(createProtectedDatabaseDetails)
.opcRetryToken("EXAMPLE-opcRetryToken-Value")
.opcDryRun(true)
.opcRequestId("UCCBPPQDHXIF5I7A11SS<unique_ID>").build();

This is a sample output of the dry run.

Status Code : 409
Service Code: IncorrectState
Error Message:
Authorization failed. Autonomous Recovery Service does not have the required security policies to
manage virtual-network-family in the chosen compartment.
See, 'Prerequisites for Using Recovery Service as a Automatic Backup Destination' in the
Recovery Service documentation.

The following compartment quotas were exceeded:
protected-database-backup-storage-gb in policy 'example-policy' by 1.

The prerequisite of registering a Recovery Service subnet is not met.
Ensure that you register a Recovery Service subnet before enabling automatic backups.
See, 'Register Recovery Service Subnet' in the Recovery Service documentation.

Ensure that you review and perform all the prerequisite tasks described in Onboarding Oracle Database to Recovery Service.

Related Topics