Simple steps to manage Autonomous Database from OCI Cloud Shell
Simple steps to manage Autonomous Database from OCI Cloud Shell
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.
This blog gives an overview of Cloud Shell and how to use connect SQL*Plus in Cloud Shell to an Autonomous Database instance.
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:
Copied 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:
Copied 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:
Copied 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!
خاتمة
The best way to find out if OCI is right for your use cases is to try it. Sign up for our Oracle Cloud Free Tier, which includes over 20 cloud services free forever and US$300 in credit of extra services for a 30-day trial.
I hope that this blog helps you to connect Autonomous Database instance using Cloud Shell in Oracle Cloud Infrastructure. If you have any questions about Cloud Shell, post them in the comments. For more information, see the following resources:
اترك تعليقاً