Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Two instances, two listeners and /etc/services

Re: Two instances, two listeners and /etc/services

From: Johnny Chan <j4ychan_at_PROBLEM_WITH_INEWS_GATEWAY_FILE>
Date: 1997/02/28
Message-ID: <5f7qi4$gl8@gw.PacBell.COM>#1/1

> A few weeks ago I created a second instance, recreated the
> tnsnames.ora, sqlnet.ora and listener.ora files with network
> manager (one listener on port 1526, the other on port 1527).
> I can now connect to both databases over the network.
> But I forgot to update my /etc/services file on the host
> machine.
> According to Oracle7 Server Installation Guide for HP 9000
> Series 700/800 Release 7.3, Prepare to install SQL*Net version 2
> products, Setup for the Oracle TCP/IP adapter, I added this
> line when installing Oracle7:
 

> listener 1526/tcp #SQL*Net version 2 listener port
 

> From Oracle7 Administrator's Reference for UNIX Release 7.3:
> "Oracle recommends that you reserve a port for your SQL*Net
> listener in the /etc/services file" and "Reserve more than one
> port to start more than one listener".
> So, I should add this line to /etc/services:
 

> listener2 1527/tcp #SQL*Net version 2 listener port
 

> The file /etc/services associates service names and aliases
> with the port number and protocol, says the man page.
 

> I do not understand why exactly I have to add these lines to
> /etc/services.
> What does Oracle mean by 'reserve a port'?

By adding an entry into /etc/services, you are marking that port as being used by Oracle for SQL*Net listeners. If some other program is dynamically attempting to find a free port, it could use the services file to figure out which port is available. The SQL*Net v2 listener doesn't check the /etc/services file itself (although in v1, it did and would not start up if the orasrv entry is not in services)

> Do I really need a line in the /etc/services file for every
> instance's listener to make it work?

You need a unique and unused port number for every listener that runs on the same node. By virtue of the above explaination, you should mark those ports as used in /etc/services as you use them, just so other programs/users don't use the same port.

However, I would like to point out that you don't need a separate listener for each instance on the same node: In all but a few exceptions, a single listener is able to handle connections into multiple instances in the same node. You merely have to configure the /etc/listener.ora file properly so that the listener listens for connection requestions to multiple instances on one port. A single listerner-per-node configuration is actually a lot more easier to manage from the client program perspective since the client tnsnames.ora will all have the same port number for all remote databases.

One rare reason why you might want multiple listeners is when a single listener is overloaded by too many simultaneous reqeusts for connections. I have seen situations where if the listener consistently gets more than 2 connect requests per secend, the listener will error with overloaded msgs.

Johnny Chan
Independent Oracle Specialist Received on Fri Feb 28 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US