Oracle database Start sqlplus

SQL*Plus is an interactive and batch query tool that is installed with every Oracle Database Server or Client installation. It has a command-line user interface

SQL*Plus has its own commands and environment, and it provides access to the Oracle Database.

First Step to start sqlplus in oracle database

Need to login with root directory

[root@3sept ~]# vi /etc/hosts

Edit host parameter and insert into host configuration file

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1       3sept

192.168.1.7   3sept

( Here : 127.0.0.1 –  is a localhost IP

            192.168.1.7   – system current IP

3sept :  is the system hosts name )

So here I have configure both IP with hosts

Save it with :wq command

Before Start sqlplus we need to configure listener according to created directory

listener file location /u02/app/oracle/product/11.2.0/dba_1/network/admin/listener.ora

we will used to edit via vi editor listener.ora file

paste in listener one of them

Example 1

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = sept)
(ORACLE_HOME = /u02/app/oracle/product/11.2.0/dba_1)
)
)

Directory appear as per created directory options u02/app/oracle/product/11.2.0/dba_1 , u01/app/oracle/product/11.2.0/da_1 like this

Example 2

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = sept)
(ORACLE_HOME = /u02/app/oracle/product/11.2.0/dba_1)
(SID_NAME = sept)
)
)

How do we connect sqlplus

How do we start Sqlplus after Installation Oracle

Before starting sqlplus

We need to check oraInstRoot.sh  file is available or not

[oracle@3sept ~]$ cd  /u02/app/oraInventory/

if we will run this command in oracle directory

[oracle@3sept oraInventory]$ ./orainstRoot.sh

This script must be executed as root

so we have to switch in root directory

Here need to run ./orainstRoot.sh command

[root@3sept oraInventory]# ./orainstRoot.sh

Now here also need to check root.sh file which we have created during installation

[root@3sept ~]# cd /u02/app/oracle/product/11.2.0/dba_1/

We need to check root.sh file available or not

[root@3sept dba_1]# ./root.sh

After execution root.sh now instance is running

Check the connection

Before starting we need to switch in oracle user

[oracle@3sept dba_1]# cat /etc/oratab

After this

If we will create database via DBCA Command we need to run netca command

[oracle@3sept ~]$ netca

if we will face Network Configuration Errors during the new creation of database vi DBCA commands

we need to perform this

we used to check listener status before updating

[oracle@querypanel ~]$ lsnrctl status

if the connection is successfully run we don’t need to update anythings if no we have to check the listener configuration

How to configure listener after netca setup in-case if getting issue in lsnrctl status – ‘NO listener supported’
cd $ORACLE_HOME/network/admin

SQL> select ‘alter system set local_listener=”(ADDRESS=(PROTOCOL=TCP)(HOST=’ || host_name || ‘)(PORT = 1521))” scope=both;’ from v$instance;

Steps:-

Login to PuTTY or Mobaterm

PuTTY Login via Oracle User

Step 2: follow the Commands

CMD> cat /etc/oratab

after the cat /etc/oratab

oratab is a file created by Oracle

Step 3: [oracle@querypanel] . oraenv

. oraenv

after [oracle@querypanel] . oraenv command have you seen there is three database you need to select one database so here i am selecting arick database

SELECT DATABASE
SELECTED Database

Step 4: Promote [oracle@querypanel] : sqlplus

sqlplus

after the command you need to type : / as sysdba

now SQL is connected

Step 5 : now we need to start sqlplus so here just type SQL> startup

step 6: so if we wanted to know which database are running so here

cmd : ps -eaf | grep pmon

in the window appearing two database

Step 7 :- wanted to know which database currently we are working

SQL> SHOW parameter db_name;

If we need to create another database

We used to follow these steps

[oracle@3sept ~]$ cd /u02/app/oracle/product/11.2.0/dba_1/bin

In bin directory there is a dbca file we need to run it for create new database

If we will check via ls –rtl cmd

[oracle@3sept bin]$ ls -rtl

We can see dbca is available so need to run it for create new database

Like this

[oracle@3sept bin]$ ./dbca

New window will be apper after the command

4 thoughts on “Oracle database Start sqlplus

Leave a Reply

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