Break New Ground

Run SQL Developer in Oracle Cloud Infrastructure and Connect to Autonomous Database

In a previous blog post, I described how to quickly create an Autonomous Database and connect to it via SQLcl. By using the the most recent Cloud Developer Image —which includes SQLcl- I was able to save a time installing and configuring. Cloud Developer Image also comes with Oracle SQL Developer pre-installed. In this post I describe how to run SQL Developer and connect it to Autonomous Database.


  1. Launch Cloud Developer Image
  2. Set up OCI cli
  3. Create Autonomous Transaction Processing Database using CLI
  4. Download Wallet using CLI
  5. Configure VNC server and connect from a VNC Client
  6. Launch SQL Developer and add Wallet
  7. Connect to the database

Step 1-4: See previous blog post

The steps to create an Autonomous Database and download the Wallet are covered in the previous blog post and apply to this tutorial as well.

5. Configure VNC server and connect from a VNC client

To access a GUI via VNC, do the following:

  • Install a VNC viewer on your local computer
    • On MacOS you can use the built-in VNC viewer in the Screen Sharing app
  • Use SSH to connect to the compute instance running the Oracle Cloud Developer Image: ssh -i <path to your ssh keys> opc@<IP address>
  • Configure a VNC password by typing vncpasswd
  • When prompted, enter a new password and verify it
  • Optionally, enter a view-only password
  • After the vncpasswd utility exits, start the VNC server by typing vncserver
  • This will start a VNC server with display number 1 for the opc user, and the VNC server will start automatically if your instance is rebooted
  • On your local computer, connect to your instance and create an ssh tunnel for port 5901 (for display number 1):
    • $ ssh -L 5901:localhost:5901 -i <path to your ssh keys> opc@<IP Address>
  • On your local computer, start a VNC viewer and establish a VNC connection to localhost:1
    • On MacOS, from Finder, hit Command-K to Connect to Server and enter vnc://localhost:5901
  • Enter the VNC password you set earlier
  • Acknowledge the welcome dialogs until you see the Oracle Linux desktop


1. Connecting to VNC Server using MacOS built-in VNC Viewer, Screen Sharing



2. Oracle Linux Desktop


Launch SQL Developer and add Wallet

Launch SQL Developer via the Applications > Programming menu. See figure 3.


3. Launching SQL Developer


Connect to the database

To create a database connection (See figure 4.):

  • In the connections panel, click the (+) icon to create a New Database Connection…
  • Name your connection
  • For Connection Type, choose Cloud Wallet
  • Browse for the wallet.zip you downloaded earlier
  • You can leave the default Service unless you have other Autonomous Databases in this tenancy


4. Creating the Database Connection


You are now ready to connect:


5. SQL Developer connected to Autonomous Database



The Oracle Linux-based Cloud Developer image includes all the tools you need to get started with Autonomous Database and Oracle SQL Developer via VNC. In this blog post I explained the steps create an Autonomous Dababase and access it via SQL Developer displayed via VNC.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.