Connect Free Oracle Autonomous Database from MuleSoft
Oracle has an always free-to-use Autonomous Database instance available on the cloud with limited features but is really a powerful database to use. We would say, it is one of the best suitable for doing proof of concepts and validation before working on an actual use case.
We thought of giving it a try to connect MuleSoft to the Free version of the Autonomous Oracle database. We created a free trial account for Oracle and an always-free autonomous database instance. Once we have the instance created, we can connect using SQL developer easily. But now the question is
How to connect this database using MuleSoft?
Let's start with prerequisites.
Prerequisites
1. Log in to the oracle cloud instance and navigate to the autonomous database instance.
2. Click on the database connection. Then click on Download wallet.
3. Enter the wallet password (and make a note of it, which will be used in later steps)and click on Download. The wallet.zip file will be downloaded.
4. Extract the downloaded zip file. We will see below files extracted.
The below steps will be familiar to both configurations
1. To fetch the connection URLs, we can either get them from the database instance page. Click on Database connection and scroll down to connection strings.
2. Select either TLS or mTLS under TLS authentication.
3. There will be 5 TNS(database service names) names available: high, low, medium, tp, and tpurgent. Click on the show, the TNS we may want to use, and copy the string. The string will contain all the details like host, port, service name, etc.
4. We can also get all these details from the file tnsnames.ora extracted from the wallet.
Connect using mTLS configurations
- Copy the keystore.jks and truststore.jks under the "src/main/resources" directory of the mule project. We can also keep it under a separate directory. In this example, we will be using the "wallet" folder to store these files.
- By providing these details, we will not be able to connect to DB as we have not configured mTLS. Click on the TLS tab and configure the details below.
- Click on Test Connection, and we will see the connection is successful.
Connect using TLS configurations
Thank you for reading and please share any thoughts or comments.
Comments
Post a Comment