Create a Data Source for an Oracle Autonomous Database
Oracle WebLogic Server for OCI provides two utility scripts to help you create Oracle Autonomous Database:
- A download script that downloads the Oracle Autonomous Database wallet files to a node
- A create script that creates the data source using the downloaded Oracle Autonomous Database wallet files and data source properties you provide
- Prerequisite: At the
root
compartment level, create an OCI policy with the following policy statement:Allow dynamic-group <service-prefix>-wlsc-principal-group to use autonomous-transaction-processing-family in compartment id <compartment-id>
To run the scripts, you need to access the nodes in your WebLogic domain as the opc
user. The scripts are located in /opt/scripts/utils
and can only be run as the oracle
user.
The Oracle Autonomous Database must allow the WebLogic Server compute instances to access the database listen port (1521 by default). Update your access control list (ACL), if necessary. See Security Tools for Serverless Deployments.
Download the Oracle Autonomous Database Wallet
The download script unpacks and copies the Oracle Autonomous Database wallet contents to a node.
Note:
The download script must be run before the create script that configures a data source.If the data source target is the domain cluster, you must run the download script on every node in the cluster. If the target is individual servers, then run the script on those servers.
You need the public IP address of each node on which you plan to run the download script. Find the IP address on the compute instance details page in the Oracle Cloud Infrastructure console. Look up the bastion's public IP address and the private IP address of a node if the WebLogic domain is in a private subnet.
Configure a Data Source for an Oracle Autonomous Database
The create script configures a JDBC data source using the downloaded Oracle Autonomous Database wallet files and the data source properties you provide.
Note:
You must run the download script before you run the create script to configure the data source.When you execute the create script, you can let the script prompt you for the properties one at a time, or you can supply the properties in a configuration file.