Create Autonomous Transaction Processing Database using CLI
Download Wallet using CLI
Configure VNC server and connect from a VNC Client
Launch SQL Developer and add Wallet
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
Conclusion
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.