8.3.2.6 Step 5: Use a Connect Identifier Containing OCI Object Storage Values
Use the Oracle Cloud Infrastructure (OCI) Object Storage server name, key path, and authentication parameters in a database client connection identifier.
config-ociobject://objectstorage-server-name/n/{namespaceName}/b/{bucketName}/o/{objectName}/[c/{networkServiceName}]?[option1=value1&option2=value2...]The syntax details are:
| Syntax Element | Description |
|---|---|
|
|
Server name of your OCI Object Storage. This is the URL Path (URI) value given on the Object Details page in the OCI console. Specify this value without the |
|
|
OCI Object Storage namespace where you have stored the JSON file. |
|
|
OCI Object Storage bucket name where you have stored the JSON file. |
|
|
JSON file to look up and resolve a network service name. |
|
|
Network service name if the JSON file contains two or more network service names. |
|
|
Both the authentication method and corresponding authentication parameters to access your Centralized Configuration Provider. Authentication method: Use the
For detailed information on these authentication methods, see AUTHENTICATION. Authentication parameters: Set authentication parameters corresponding to your chosen authentication method:
|
Examples:
Let us look at some examples on how to specify a connect identifier string with different values:
-
Database credentials specified in the string:
sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem" -
Database credentials stored in OCI Vault:
The vault reference is configured in thesales.jsonfile:sqlplus /@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem" -
Network service name specified in the JSON file:
A network service name is given (asc/hr) to indicate a specific name among many network service names in themulti.jsonfile:sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/hr?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem" -
With the default OCI API Key authentication:
Here, the
AUTHENTICATION=OCI_DEFAULTsetting is omitted. Authentication method for the default flow is implicit, so only the API key-related values are specified using theOCI_TENANCY,OCI_USER,OCI_FINGERPRINT, andOCI_KEY_FILEauthentication parameters.sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/sales.json?oci_tenancy=ocid1.tenancy.oc1..aaabbb1234aaabbb&oci_user=ocid1.user.oc1..ababab12121212&oci_fingerprint=a1:bc:a1:1a:12:a1:a2:b1:b2:1b&oci_key_file=//app/mykey.pem" -
With the OCI Instance Principal authentication:
sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/sales?authentication=oci_instance_principal" -
With the OCI Resource Principal authentication:
sqlplus dbuser/@"config-ociobject://objectstorage.us-region-1.example.com/n/myappnamespace/b/dbclientapps/o/multi.json/c/sales?authentication=oci_resource_principal"