Open In App

How to Install SQLplus on Linux?

Last Updated : 31 Jan, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Oracle database is the popular database that is commonly used in transaction processing, data warehousing, and various other applications. SQLplus is an interface that is developed by Oracle itself. The main purpose of SQLplus is to interact with the Oracle DB and run various queries or code. We can say SQLplus is a powerful tool rather than an interface. It acts like an editor, writer and also executes the SQL queries and displays the output. In this article, we will be going through the installation steps of SQLplus in the Linux Operating System.

Installing SQLplus on Linux

Follow the below steps to install SQLPlus on Linux Operating System:

Step 1: Download the Basic Package (ZIP) by using the following command:

wget https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip

Downloading-the-Basic-Package

Step 2: Download the SQL*Plus Package (ZIP) by using the following command:

wget https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-sqlplus-linux.x64-21.4.0.0.0dbru.zip 

Downloading-the-SQL*Plus-Package

Step 3: Make a new directory for the instant client.

sudo mkdir -p /opt/oracle

Making-a-new-directory

Step 4: Unzip the Basic Package in the newly-created directory.

sudo unzip -d /opt/oracle instantclient-basic-linux.x64-21.4.0.0.0dbru.zip

Unzip-the-Basic-Package

Step 5: Unzip the SQL *Plus Package in the newly-created directory.

sudo unzip -d /opt/oracle instantclient-sqlplus-linux.x64-21.4.0.0.0dbru.zip

Unzip-the-SQL*Plus-Package

Step 6: List out the file contents of the newly-created directory.

cd /opt/oracle/instantclient_21_4 && find . -type f | sort

Listing-out-the-file-contents-of-the-directory

Step 7: Set the LD_LIBRARY_PATH  in your ~/.bashrc source file.

export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_4:$LD_LIBRARY_PATH

Setting-the-library-path-in-the-soruce-file

Step 8: Set the PATH env vars in your ~/.bashrc

export PATH=$LD_LIBRARY_PATH:$PATH

Setting-the-path

Step 9: Source your ~/.bashrc file

source ~/.bashrc

Source-~/.bashrc file

Step 10: Run sqlplus -V command to confirm it’s installed or not.

sqlplus -V

Verifying-SQLPlus-is-properly-installed-or-not


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads