How to Install SQLplus on Linux?
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
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
Step 3: Make a new directory for the instant client.
sudo mkdir -p /opt/oracle
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
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
Step 6: List out the file contents of the newly-created directory.
cd /opt/oracle/instantclient_21_4 && find . -type f | sort
Step 7: Set the LD_LIBRARY_PATH in your ~/.bashrc source file.
export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_4:$LD_LIBRARY_PATH
Step 8: Set the PATH env vars in your ~/.bashrc
export PATH=$LD_LIBRARY_PATH:$PATH
Step 9: Source your ~/.bashrc file
source ~/.bashrc
Step 10: Run sqlplus -V command to confirm it’s installed or not.
sqlplus -V