How to Install SQLplus on Linux?
Last Updated :
24 Jul, 2024
Oracle database is a popular database commonly used in transaction processing, data warehousing, and various other applications. SQLplus is an interface that Oracle itself develops. 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, and writer and also executes the SQL queries and displays the output. In this article, we will review the installation steps for SQLplus in the Linux operating system.
Installing SQLplus on Linux
Follow the below steps to install SQLPlus on a 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

Step 11: Connect to the Database
- Use the following command to connect to the database:
sqlplus username/password@//hostname:port/service_name
sqlplus scott/tiger@//localhost:1521/orcl
Conclusion
Putting SQLPlus on Linux is an easy procedure that requires obtaining the Oracle Instant Client packages through download, configuring environment variables, and linking to your Oracle database. By adhering to the instructions provided in this manual, you can effectively handle your Oracle databases from the Linux command line with SQLPlus. Whether you’re a developer, database administrator, or IT expert, learning SQL*Plus on Linux will improve your ability to manage databases and make your work more efficient.
Similar Reads
How to Install sqlsus on Kali Linux?
Sqlsus tool is an automated cyber security tool developed in the Perl Language which has the capability of detecting SQL Injection and Takeover the access of the database if the web application is vulnerable. Sqlsus tool is a command-line-based tool so you can pass the flags or tags in the command i
2 min read
How to Install Perl on Linux?
Prerequisite: Introduction to Perl Before, we start with the process of Installing Perl on our System. We must have first-hand knowledge of What the Perl Language is and what it actually does?. Perl is a general-purpose, high level interpreted and dynamic programming language. Perl was originally de
3 min read
How to Install PHP on Linux?
PHP is a popular server-side scripting language that is especially used in web development. If you're working on a Linux environment, whether it's a personal development setup or a production server, you will likely need PHP installed. In this article, we will see the step-by-step guide to install P
2 min read
How to Install SQLplus on MacOS?
Oracle database is the most commonly used database in transaction processing, data warehousing, and several other applications. SQLPlus is the basic Oracle Database utility and the main purpose of this module is to interact with the Oracle database and run different types of queries. It is the most
2 min read
How to Install SQL Loader on Linux?
Using SQL Loader, data from external files are loaded into Oracle database tables. Its robust data parsing engine imposes few restrictions on the data file's format. SQL loader can load data from multiple data files in the same load session. Using SQL functions, data can be manipulated before loadin
2 min read
How to Install RubyGems on Linux?
RubyGems is a service for hosting gems of Ruby's community. You can publish your own gem and host it on RubyGems. In this article, we will look into the process of installing RubyGems on a Linux system. Installing RubyGems on Linux: RubyGems can be downloaded from its official website and can be ins
1 min read
How to Install SQLmap in Linux?
SQL Injection Vulnerability can be detected and exploited through various automated tools. It is an open-source cyber security tool that introduces its most powerful SQLi detection engine. All the task of flaw detection and gaining access to the database is done in an automated way. This tool is so
3 min read
How to Install Python on Linux
This guide explains how to install Python on Linux machines. Python has become an essential programming language for developers, data scientists, and system administrators. It's used for various applications, including web development, data science, automation, and machine learning. This comprehensi
15+ min read
How to Install MySQL on Linux?
MySQL is an open-source relational database management system that is based on SQL queries. Here, "My" represents the name of the co-founder Michael Widenius's daughter and "SQL" represents the Structured Query Language. MySQL is used for data operations like querying, filtering, sorting, grouping,
3 min read
How to Install SQLplus on Windows?
Sqlplus is an interface provided by Oracle database to interact only with Oracle Database. It is having the flexibility to write some Oracle specific code. Sqlplus is a tool created by Oracle for its Oracle DB. It is a very popular tool since it comes. It has its own syntax in addition to supporting
2 min read