How to connect Autonomous Linux with Autonomous Database in Oracle Cloud
Always free Oracle cloud + $ 300 FREE CREDITS
Promo link: http://bit.ly/2Q7ye6u
- Create Autonomous Linux Instance (& Autonomous Database).
Assign Public IP address to your instance to allow remote connection:
Attached VNICs > Your_instance name (Primary VNIC) > IP adresses > EPHEMERAL PUBLIC IP
2. Connect to your instance using Putty or other preferred way.
Oracle Linux default username: opc
Ubuntu Linux default username: ubuntu
How to connect using Putty on Windows here
3. Download and Install SQL*Plus to Oracle directory.
Create new directory
mkdir /home/opc/oracle
Download sqlplus 18.3
wget -P /home/opc/oracle/ http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-sqlplus-18.3.0.0.0-3.x86_64.rpm
cd /home/opc/oracle
sudo rpm -ivh oracle-instantclient18.3-sqlplus-18.3.0.0.0–3.x86_64.rpm
export LD_LIBRARY_PATH=”/usr/lib/oracle/18.3/client64/lib/”
echo $LD_LIBRARY_PATH
sqlplus64 -version
You can update /home/opc/.bash_profile
With export LD_LIBRARY_PATH=”/usr/lib/oracle/18.3/client64/lib/”
So every time you logged out, you do not need to repeat previous steps manually
4. Download Client Credentials (Wallet) from your Autonomous DB and unzip.
5. You need to upload your wallet to your Linux VM
Create new directory
mkdir /home/opc/atp_wallet
You can use Oracle Object Storage to upload your wallet into Linux VM
Create pre-authentication request for the file
wget -P /home/opc /atp_wallet “your_secure_file_url”
unzip yourfilels.zip
6. Update sqlnet.ora directory to /home/opc/atp_wallet
nano /home/opc/atp_wallet/slqnet.ora
7. Update .bashrc
nano /home/opc/.bashrc
Add the following:
export TNS_ADMIN=’/home/opc/atp_wallet’
alias sqlplus=’sqlplus64'
alias srf=’source /home/opc/.bashrc
8. Now you can use sqlplus to connect to your Autonomous Database
sqlplus admin/your_password@your_database_high
your_database_high — from tnsnames.ora file