Oracle Networking Connecting two Nodes

Node1 :

#vi /etc/hosts node1 node2


Node2 :

#vi /etc/hosts node1 node2


Note:If two systems are in networking , we can configure one system in to another.

i.e: ssh node2 (ssh= secured shell)

root@node1> # ping (or) ping node2

root@node1> ssh node2
password: ********

root@node2> # su – oracle
password: ********

root@node2># su – oracle

oracle@node2> $ export ORACLE_SID=hrms

oracle@node2> $ sqlplus / as sysdba

SQL> startup

sql> exit

oracle@node2>$ cd $ORACLE_HOME/network/admin

admin>$ ls
listener.ora samples

admin>$ which netca

admin>$ netca

admin>$ exit

node2> xhost +

node2> exit ( enter into client machine)

node1> xhost +

root@node1># ssh -Y oracle@node2

oracle@node2>$ netca

.listener configuration > next
.add > next
.Listener name= listener > next
.TCP > next
.use standard port number=1521 >next
.would you like to configure another listener = no > next
.Listener configuration complete > next

oracle@node2>$ cd /u01/app/oracle/product/11.2.0/db_home/network/admin

admin> ls
listener.ora samples

oracle@node2 admin> vi listener.ora

Note: Dynamic listener no contains SID, so if the listener can provide
accesibility to all databases.
and when we use static listener we mentioned SID manually.

oracle@node2 admin>$ cd samples

oracle@node2 samples>$ ls
listener.ora tnsnames.ora sqlnet.ora

After opening the file set the line numbers:
:set nu

:33,46 w >> /u01/app/oracle/product/11.2.0/db_home/network/admin/listener.ora

oracle@node2 samples>$ cd ..

oracle@node2 admin>$ vi listener.ora


oracle@node2 admin>$ lsnrctl start listener
admin>$ lsnrctl status listener

To connect to client Machine:

root@node1># su – oracle

oracle@node1>$ cd /u01/app/oracle/product/11.2.0/db_home/network/admin/

oracle@node1 admin>$ netca

.click on local net service name configuration > next
.Add > next
.service=hrms > next
.TCP > next
.use standard port=1521 > next
.no doesnt > next
.Net service name=to _hrms > next
( we can write any name)


oracle@node1 admin> $ vi tnsnames.ora



oracle@node1 admin>$ tnsping to_hrms

oracle@node2 admin>$ stop listener

oracle@node1 admin>$ tnsping to_hrms

oracle@node2>$ ps -ef|grep smon

oracle@node1>$ sqlplus scott/tiger@to_hrms

(Now we can enter as an scott user)

SQL> exit

Now we will enter as sys user but we forget my password of sys user.

oracle@node2>$ cd $ORACLE_HOME/dbs

oracle@node2 dbs> orapwd file=orapwdhrms password=oracle entries=3 force=y

oracle@node2 dbs>$ cd

oracle@node1>$ sqlplus sys/oracle@to_hrms as sysdba



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s