Associate a Service Instance With a Different Database
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/associations/recreate
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:
- Choosing a Migration Method
- Creating a Clone Database Deployment from a Snapshot
- Creating a Database Deployment Using a Cloud Backup
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
- application/vnd.com.oracle.oracloud.provisioning.Service+json
-
identityDomainId: string
Identity domain ID for the Oracle Java Cloud Service account.
-
serviceId: string
Name of the Oracle Java Cloud Service instance.
-
Authorization: string
Base64 encoded user name and password separated by a colon or OAuth access token obtained from Oracle Identity Cloud Service. See Authenticate.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle Java Cloud Service account.
object
-
INFRA_DB:
object INFRA_DB
Groups details of an infrastructure database association.
object
-
assocDescription:
string
A description to help identify the purpose for this association.
-
assocDisplayName(optional):
string
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.
-
dbaName:
string
User name for the database administrator.
This value must not be
SYSTEM
. Specify a database user that has been granted theSYSDBA
privilege. For service instances based on Oracle WebLogic Server 12c (any version), you can use the database userSYS
. -
dbaPassword:
string
Password for the Database administrator that was specified when the Database Cloud Service database deployment specified in
destServiceName
was created. -
destServiceName:
string
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.
Response
- application/json
202 Response
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.
object
-
details:
object details
Groups details of the operation. The response body can include an
issues
array for warning messages.
object
issues
array for warning messages.-
issues(optional):
array issues
Groups strings of warning messages, if any.
-
jobId:
string
Job ID for the operation. Not available if the response status code is 400.
-
message:
string
System message that describes the operation.
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"
}
}