Oracle Cloud Infrastructure (OCI) Cloud Shell is a web browser-based terminal available from the Oracle Cloud Console. OCI Cloud Shell provides access to a Linux shell with a preauthenticated OCI CLI and several useful development tools and utilities preinstalled. Cloud Shell is a feature available to all OCI users, accessible from the Console. Cloud Shell includes 5 GB of backing storage for your home directory. Any changes that you make in your home directory persist to a volume stored in the home region of your tenancy and encrypted at rest.
Cloud Shell to SQL*Plus
- Click the Cloud Shell icon in the upper-right corner of the Oracle Cloud Console:
- Generate the wallet for the autonomous database to connect and run the following command:Copy code snippetCopied to ClipboardError: Could not CopyCopied to ClipboardError: Could not Copy
oci db autonomous-database generate-wallet --autonomous-database-id <autonomous database="" oci="" id=""> --file wallet.zip --password 'xxxxxxx'</autonomous>
- Create a directory and unzip the wallet.
- Set TNS_ADMIN environment variable to the directory where the wallet unzipped the files:Copy code snippetCopied to ClipboardError: Could not CopyCopied to ClipboardError: Could not Copy
export TNS_ADMIN=/home/dan_yadav/wallet echo $TNS_ADMIN
- Edit the sqlnet.ora and set the path of the wallet to the directory that has credentials files:
- Find the service name from tnsnames.ora and connect Autonomous Database using SQL*Plus. Then input the password defined when creating the autonomous database:Copy code snippetCopied to ClipboardError: Could not CopyCopied to ClipboardError: Could not Copy
$ sqlplus admin@testadw_low
The connection is made successfully to Autonomous Database from Cloud Shell!