Associate a Service Instance With a Different Database

put

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/associations/recreate

This endpoint only applies to Oracle Java Cloud Service instances created on Oracle Cloud Infrastructure Classic.

Reassociates an Oracle Java Cloud Service instance to another Oracle Database Cloud Service database deployment for the infrastructure schema database.

Reassociating is not supported for service instances that were created before release 17.4.1. To find out whether a service instance was created before release 17.4.1, send a GET REST API request to the service instance (described in View a Service Instance). In the data that the API request returns, search for the line, "provisionEngine":"Metadata_x_y" (for example, "provisionEngine":"Metadata_1_0"). If the line exists, the service instance was created using release 17.4.1 or higher. If the line does not exist, the instance was created using a release before 17.4.1.

Before associating a service instance with a different infrastructure schema database, you must migrate the existing schema and data from the current database to the target database. See these topics in Administering Oracle Database Cloud Service:

Note also the following:

  • This endpoint is not supported for Oracle Java Cloud Service instances running Oracle WebLogic Server 11.1.1.7.
  • Both the original and the target Database Cloud Service deployment must be of type Single Instance. All other database types are not supported, including Database Clustering with RAC and Single Instance with Data Guard Standby.
  • Oracle Database Exadata Cloud Service is not supported.
  • Backups must be enabled on the Java Cloud Service instance and the target Database Cloud Service database deployment.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body defines the association details.
Root Schema : reassociate-request
Type: object
Show Source
Nested Schema : INFRA_DB
Type: object
Groups details of an infrastructure database association.
Show Source
  • A description to help identify the purpose for this association.
  • An optional name to identify this association.

    The name cannot have more than 200 chars, should start with a letter, and only hyphen can be used as a special character.

  • User name for the database administrator.

    This value must not be SYSTEM. Specify a database user that has been granted the SYSDBA privilege. For service instances based on Oracle WebLogic Server 12c (any version), you can use the database user SYS.

  • Password for the Database administrator that was specified when the Database Cloud Service database deployment specified in destServiceName was created.
  • An existing Oracle Database Cloud Service instance to re-associate this Oracle Java Cloud Service instance. The selected database should be a single instance database, should have backups enabled, and should have the same schema as the current database.
Back to Top

Response

Supported Media Types

202 Response

Accepted.

The Location header returns a URI that can be used to view the job status. See View the Status of an Operation by Job Id.

See Status Codes for information about other possible HTTP status codes.

Body ()
Root Schema : reassociate-response
Type: object
Show Source
  • details
    Groups details of the operation. The response body can include an issues array for warning messages.
Nested Schema : details
Type: object
Groups details of the operation. The response body can include an issues array for warning messages.
Show Source
Nested Schema : issues
Type: array
Groups strings of warning messages, if any.
Show Source
Back to Top

Examples

The following example shows how to reassociate an Oracle Java Cloud Service instance with a different database deployment on Oracle Database Cloud Service for the infrastructure schema database.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

cURL Command

curl -i -X PUT -u username:password -d @reassociateinfradb.json -H "Content-Type:application/vnd.com.oracle.oracloud.provisioning.Service+json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/associations/recreate

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
    "INFRA_DB" :{
      "destServiceName":"myDBCS02",
      "assocDisplayName":"A display name",
      "assocDescription":"A description",
      "dbaName":"SYS",
      "dbaPassword":"password"
    }
}

Example of Response Body

The following shows an example of the response document returned in JSON format.

{
   "details":
   {
      "message":"Message.",
      "jobId":"5028794"
   }
}
Back to Top