Home » RDBMS Server » Networking and Gateways » Multiple listeners (10g R1, Linux)
Multiple listeners [message #288012] Fri, 14 December 2007 05:39 Go to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Hi all, i am just doing some r&d with listeners and face some pbm

here is my listener file .I am trying to add multiple listeners in same file.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = PROD.KITCOMP.TAPASI.COM)
      (ORACLE_HOME = /u01/app/oracle/OraHome_1)
      (SID_NAME = prod)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = kitcomp.tapasi.com)(PORT = 1521))
  )
LISTENER2 =
 (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = kitcomp.tapasi.com)(PORT = 1523))
  )



Now i start my second listener(LISTENER2)

LSNRCTL> start LISTENER2
Starting /u01/app/oracle/OraHome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.3.0 - Production
System parameter file is /u01/app/oracle/OraHome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/OraHome_1/network/log/listener2.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kitcomp.tapasi.com)(PORT=1525)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=kitcomp.tapasi.com)(PORT=1525)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER2
Version                   TNSLSNR for Linux: Version 10.1.0.3.0 - Production
Start Date                15-DEC-2007 16:48:12
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/OraHome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/OraHome_1/network/log/listener2.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kitcomp.tapasi.com)(PORT=1525)))
The listener supports no services
The command completed successfully


and then the first one(LISTENER)

LSNRCTL> start LISTENER
Starting /u01/app/oracle/OraHome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.3.0 - Production
System parameter file is /u01/app/oracle/OraHome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/OraHome_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kitcomp.tapasi.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=kitcomp.tapasi.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.1.0.3.0 - Production
Start Date                15-DEC-2007 16:48:34
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/OraHome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/OraHome_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kitcomp.tapasi.com)(PORT=1521)))
Services Summary...
Service "PROD.KITCOMP.TAPASI.COM" has 1 instance(s).
  Instance "prod", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


and now the question, when i start LISTENER2 listener service, why it gives message "The listener supports no services" ???

[Updated on: Fri, 14 December 2007 05:40]

Report message to a moderator

Re: Multiple listeners [message #288039 is a reply to message #288012] Fri, 14 December 2007 07:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You don't give any SID to listen on (you should have a SID_LIST_LISTENER2 part) and no database register to listener2.

Regards
Michel
Re: Multiple listeners [message #288053 is a reply to message #288012] Fri, 14 December 2007 09:07 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Thanks Mike , i didnt notice that part of the listener.

and one more question. what is the best practice in using listeners ?
Is it good to have same listeners for multiple instances?
or
its always good to have multiple listeners for different SIDs ?

Finaly i may have to check the load on the listener.Any idea how can i do that ?
Re: Multiple listeners [message #288064 is a reply to message #288053] Fri, 14 December 2007 10:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
One server, one listener (except for some exceptions like using external procedures or experimenting listener overload, very rare).

Regards
Michel
Re: Multiple listeners [message #288067 is a reply to message #288012] Fri, 14 December 2007 11:24 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
ok ,you mean to say its good for load balancing if there are more number of connection .

Do you have any methord to check what is the load on a listener and how we determine its too high ?

thanks for your time
Re: Multiple listeners [message #288069 is a reply to message #288012] Fri, 14 December 2007 11:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>ok ,you mean to say its good for load balancing if there are more number of connection .
NO, NO, NO!
An Oracle listener only purpose is to facilitate making the INITIAL connection between a client & the database.

After the client is connected to the database, the listener has NO involvement with that client; unless or until a new session is requested.

How can a listener "load balance" was a TNS alias is tied to a specific port?
When that port is being used between two systems, no other external system can access that single port.

IMO, the only time to have multiple listeners is when the database server system has multiple Network Interface Cards on multiple subnets & the database needs to service clients on both subnets.
Re: Multiple listeners [message #288070 is a reply to message #288067] Fri, 14 December 2007 12:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
very rare
This was an important point.
I once had to add listener (for performances reason) in a case where there were hundred connections per second.

Regards
Michel
Re: Multiple listeners [message #288072 is a reply to message #288012] Fri, 14 December 2007 12:17 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Ok Thank you,its clear now.

and finaly ..
when i started the databases,i could see there is one more entry in listener status.

Service "prodXDB.kitcomp.tapasi.com" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...


Can you please tell me what it means ?
Re: Multiple listeners [message #288119 is a reply to message #288072] Fri, 14 December 2007 23:00 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

http://download.oracle.com/docs/cd/B14117_01/network.101/b10775/listenercfg.htm#g511554
Re: Multiple listeners [message #288459 is a reply to message #288119] Mon, 17 December 2007 11:14 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
LISTENER only involve with the receiving of connection requests and hands that requests to dispatcher and
dispatcher put that request in the request queue,
and server process looks every time in the request queue is there any requests in the request queue or not if there is
request server process picks up that request and process the results and put the result in response queue
and same the reverse from response queue to DISPATCHER and dispatcher to listener and user.

So listener is involve for very short time AFAIK.
Re: Multiple listeners [message #479229 is a reply to message #288070] Fri, 15 October 2010 07:37 Go to previous message
Lain
Messages: 7
Registered: October 2010
Location: Roma
Junior Member
Michel Cadot wrote on Fri, 14 December 2007 12:09
very rare
This was an important point.
I once had to add listener (for performances reason) in a case where there were hundred connections per second.

Regards
Michel

Hi Michel and all forum.
I have the same need.. In my future env I could have hundred connects per second.
U mean that I'll do this: 2 NIC for 2 listener with 2 different or same port (for example the first on 1521 and second 1522).
I will configure an Oracle RAC 11g with 2 separated listener. I think that I will do this:
RAC1:
    * hostname: rac1.localdomain
    * IP Address eth0: 192.168.2.101 (public address)
    * IP Address eth2: 192.168.2.121 (public address)
    * Default Gateway eth0: 192.168.2.1 (public address)
    * IP Address eth1: 192.168.0.101 (private address)
    * Default Gateway eth1: none
RAC2:
    * hostname: rac2.localdomain
    * IP Address eth0: 192.168.2.102 (public address)
    * IP Address eth2: 192.168.2.122 (public address)
    * Default Gateway eth0: 192.168.2.1 (public address)
    * IP Address eth1: 192.168.0.102 (private address)
    * Default Gateway eth1: none

RAC1:
127.0.0.1       localhost.localdomain   localhost
# Public
192.168.2.101   rac1a.localdomain        rac1a
192.168.2.121   rac1b.localdomain        rac1b
192.168.2.102   rac2a.localdomain        rac2a
192.168.2.122   rac2b.localdomain        rac2b
#Private
192.168.0.101   rac1-priv.localdomain   rac1-priv
192.168.0.102   rac2-priv.localdomain   rac2-priv
#Virtual
192.168.2.111   rac1a-vip.localdomain    rac1a-vip
192.168.2.123   rac1b-vip.localdomain    rac1b-vip
192.168.2.112   rac2a-vip.localdomain    rac2a-vip
192.168.2.124   rac2b-vip.localdomain    rac2b-vip


LISTENER_RAC2a =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac2a-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.102)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

LISTENER_RAC2b =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac2b-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.122)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

LISTENER_RAC1a =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac1a-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.101)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

LISTENER_RAC1b =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac1b-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.121)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )


many thanks for all suggest.
Cheers,
Lain

[Updated on: Fri, 15 October 2010 07:41]

Report message to a moderator

Previous Topic: Testing Private DB link with the same name as Public
Next Topic: Not able to start listner
Goto Forum:
  


Current Time: Sat Nov 23 20:15:21 CST 2024