In the previous article, we have provisioned a Oracle Database (DBaaS) instance. This article will show how to connect DBaaS instance from SQL developer from public network. 

By default, the rule to access the Database instance from SQL Developer is disabled.

Let’s see what happens when we try to connect DB instance using SQL developer before we enable the rule.

Find out the DB details by clicking the DB instance which we have created

See the Public IP and try to connect with SQL developer. Will get the error “Test failed: IO Error: The Network Adapter could not establish the connection

The port 1521 is not allowed from the public network. Let’s enable the port and try again.

When a database instance is created a number of Oracle Compute Cloud Service access rules are created, but set to a disabled status. When we enable one of these predefined access rules, the given port on the compute node is opened to the public internet.

In order to connect the DB with SQL developer one predefined rule “ora_p2_dblistener” need to enable

To enable the rule “ora_p2_dblistener”, Click on the hamburger menu beside the database service name and Click “Access Rules

To enable SQL Developer access, click the menu  hamburger menu beside  the “ora_p2_dblistener” access rule, and select Enable

Click Enable from the Enable Access rule popup

Once the rule is enabled, a red cross sign will go away which indicates the rule has been enabled successfully

Now try again to make connection using SQL developer, this time connection should be successful.