Connect to Oracle Cloud from SQLPlus and Instant Client

cloudoraclesqlplus

I want to try to connect with SQLPlus to Oracle Cloud.

for regular oracle I can connect from remote machine as follows:

IP = 1.2.3.4
PORT = 1521 
ServiceName = "ORCL1"
Username = "username"
Password = "password";

sqlplus username/password@1.2.3.4:1521/ORCL1

Is it possible to connect also to oracle cloud in a similar way?

Next step is to connect Oracle Instant Client to Oracle Cloud, but I want to do so without any installation (except copy of DLLs, but without need of editing 'tnsnames.ora' etc.).

I use occi interface like this:

IP = 1.2.3.4
PORT = 1521 
ServiceName = "ORCL1"
Username = "username"
Password = "password";

env->createConnection("username", "password", "1.2.3.4:1521/ORCL1");

Can I connect in the same way (or how to connect) to Oracle Cloud?

Best Answer

Assuming your Oracle database on Oracle cloud then you can connect to SQPLUS over SSH:

  1. connect to oracle cloud service
  2. click on the name of the deployment you want to connect to
  3. copy public IP address
  4. switch to Linux command prombt
  5. check your and confirm the private public key for your deployment exist
  6. run ssh -i ua_key_openssh oracle@IPADDRESS_YOU_GOT_FROM_POINT3
  7. execute sqlplus command
  8. enter username\password