One of the things that make us feel comfortable when working with a database is the ability to ssh into the server, connect to the database, and use sqlplus or sqlcl to interact with the database. You might not know it, but even though the Oracle Database Cloud Service is a PaaS solution, you still have the ability to ssh into the database server. Let’s quickly take a look at the process.
Obviously, you need to have a database instance configured. Click here to get the steps to set that up. This process can take close to 30 minutes to complete, so be patient. Once you have successfully created your Oracle Database Cloud Service instance, you are ready to ssh into the server. Before we do that, note a couple of things:
- If applicable, your ssh passphrase and,
- Locate the public IP address of the instance by clicking on the instance name on the dashboard.
Armed with this information, launch a terminal window and ssh into the server with the OPC account using the following steps:
- Change to the directory where you ssh key(s) are saved
- Execute the following command: ssh opc@<ipaddress> -i <sshkeyfilename>
From here you can sudo to the oracle account: sudo su – oracle
and connect to the oracle database directly.
and of course since SQLcl is included with this version of the database, you have the option to connect with that as well:
There you have it!
Also published on Medium.