Monday, June 13, 2016

Create Oracle Cloud Database Connection in Jdeveloper 12.2.1

While doing development on J2EE and ADF very often it is needed to create Oracle Database Connection from Jdeveloper. Jdeveloper provides a wonderful easy window to create and manage multiple Database Connections.

Since the environments have started to move to Cloud much often it is required to create Database Connection for the Oracle Database which is hosted on Oracle Database Cloud Service (DBCS).

There was no way to create SSH Tunnel in Jdeveloper and one has to tunnel the traffic using Putty or SSH command and then use the localhost in jdeveloper database connection window to create successful connection to Database on Cloud.

Jdeveloper 12.2.1 solved this problem by providing a very nice SSH Tunnel window in Database Connections Set up. This SSH Tunnel Configuration can be used to do configure the tunnel and use SSH Public key and user to create the connection.

Below is the process for creating a successful Database Cloud Instance connection from Jdeveloper 12.2.1

On clicking + sign for adding new connection, below window pops up.




Give a name to the connection and provide username & password.

Leave hostname as localhost and provide name of PDB in service name which you are connecting if using Oracle DB 12c.

It goes in this format : PDBNAME.IdentityDomain.oraclecloud.internal





Now click on SSH. This is the new button in Jdev 12.2.1 which will open Tunnel Configuration. We are actually tunneling traffic to port 1521 thru SSH using this window.



On the SSH Tunnel window, click on Use SSH.

Provide the SSH Host name which is the IP Address of the VM on DBCS.

Uncheck - Current user and key in oracle as SSH User.

Check Public Key for Authentication.





Browse & select the private key file by clicking Browse button.

Check on Save Passphrase if you have set Passphrase and provide passphrase for your private key if there is any. This will prevent jdev asking for passphrase again and again every time you connect to Database Instance.


Click OK.

Click on Test Connection. It should be successful.



Here you go. SSH Tunnel configuration window in Jdev 12.2.1 makes it very simple to create connection to Database Instance on Oracle Public Cloud without using any other tool or command to tunnel the connections.

Thanks

6 comments:

  1. Thanks .... almost got screwed from my manager if it was'nt for this article........

    ReplyDelete
    Replies
    1. Thanks Abhishek. Glad you liked this post!!

      Delete
  2. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/blog/2016/08/01/cloud-computing-interview-questions/

    ReplyDelete
  3. Hi,
    Thanks for the valuable information posted by you on oracle cloud.keep posting such articles.
    Thank you.
    oracle fusion training

    ReplyDelete