Oracle Autonomous Database: Connect to OCI’s Autonomous Database Pvt Endpoint from Local

Santhosh Kumar BVSRK
4 min readNov 16, 2022

--

Have discussed in detail how to provision an Autonomous Database on the Pvt endpoint and how to restrict traffic or provide access in my previous blog.

In this blog, we will see how to access this instance of an Autonomous database created on Pvt. endpoint from a local SQL Developer.

By this time, we are aware that to access Autonomous Database created on Pvt. endpoint we need either a Jump Server (or) a Bastion (or) a Load Balancer. For the purpose of this blog, I’ll be choosing a Jump Server.

Figure 1.0

Fetch Private IP from Autonomous Database in Private Network

Figure 1.1

Now, let us see how to access this database from SQL Developer local via Jump server which I have created in the same VCN as ADB but on Public Subnet.

To do that, let us first create an SSH Host with local port forwarding. For this, right click on SSH Hosts in your SQL Developer and click on “New SSH Host

Figure 1.2

Now, let us see how to create SSH cost connection.

Figure 1.3
  1. Give some name for your SSH Host
  2. This should be the Public of Jump Server (highlighted in Figure 1.0)
  3. Port of the Jump Server. Her it is 22, because my Jump Server is a Linux based VM and default port of Linux VM is 22.
  4. This is the username with which you will login to the Jump Server. By default OCI Linux VM username is opc (default user created with a Linux VM).
  5. Enable “Use Key File” check box and choose the SSH Private Key using which you can login to the Linux VM (Jump Server).
  6. Enable “Add Local Port Forward” checkbox and give name to your Port Forward.
  7. Populate the Private IP of your ADB (highlighted in Figure 1.1)
  8. Port of your ADB. 1521 is the default port for ADB.
  9. This completes the configuration, now you can click on OK to complete it.

Now, let us test the SSH Host connection to see if our configuration details provided are correct. For this right click on the newly created SSH Host and click on “Test

Figure 1.4
Figure 1.5

Now, let us create a Database connection. For which you click on Create Connection on top and provide details as shown below:

Figure 1.6
  1. Provide a name for your Database connection.
  2. Choose Database Type as “Oracle”.
  3. Give your ADB username & password.
  4. Choose Connection Type from drop-down as “Cloud Wallet
  5. Choose the Cloud Wallet which you have downloaded from ADB console screen and click Test. (Figure 1.7 shows how to download the Cloud Wallet from ADB Console screen)
Figure 1.7

This completes creation of connection to Autonomous Database on Pvt. Endpoint from your local SQL Developer.

NOTE: For this entire thing to work. You have to enable traffic from your local server IP i.e., where you have SQL Developer on the Public Subnet of Jump Server on TCP Protocol for Ports 22, 1521 & 1522.

Next time when you want to connect to the Database, first you have to right-click on SSH Host created earlier and click Connect post which you’ll be able to connect to the Database.

!!! HAPPY READING !!!

--

--

Santhosh Kumar BVSRK
Santhosh Kumar BVSRK

Written by Santhosh Kumar BVSRK

17+ Years in IT/ITES| ML & AI Enthusiast| Oracle Cloud Architect, Integration Specialist — BPEL, OSB, OIC, IICS| Database Scripting-SQL, PL/SQL, MySQL

Responses (1)