How To Connect To Oracle With sqlplus

 

In this article, I will tell you how to connect to the oracle database with sqlplus after connecting to server with ssh.

We are doing ssh with server as root user.

You can use programs like xshell for this.

 

Loading Environment

Before we can connect to the Oracle database, we need to load the environment first.

To load the environment, first the instance’s SID information is required.

You can find the SID using the command below.

In the section after “pmon _” you can see the SID of the instances.

 

After typing the command “.oraenv” you should press enter. Then, in the place where SID1 is written, you must write the SID of the instance you want to connect to.

 

This SID must be registered in “/etc/oratab”.

You can check and modify the oratab with the following command.

 

Another way to install the environment is to create a profile file and load this profile file.

You can read the article “How To Create .profile File To Connect The Oracle” for this process.

 

Connect Oracle Instance

You can connect to the corresponding instance of the database with the following command.

 

Of course, your user must have sysdba authority.

Typically, installation is done with oracle user and becomes sysdba authority.

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *