Home » RDBMS Server » Networking and Gateways » two different listeners in the same server
two different listeners in the same server [message #67711] Mon, 24 January 2005 04:21 Go to next message
Marcio
Messages: 2
Registered: January 2005
Junior Member
Hello !

I´m working with Oracle 9.2.0 / HP-UX and I need to configure two different listeners for the same server using different IP address.

How could I do this ?

Regards,

Márcio.
Re: two different listeners in the same server [message #67712 is a reply to message #67711] Mon, 24 January 2005 04:54 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Here is a quick LISTENER.ORA template that defines two listeners. If you need more info, see the Oracle Net Manuals:

LISTENER1=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=us.acme.com)(PORT=1521))))

SID_LIST_LISTENER1=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=sales.us.acme.com)
      (ORACLE_HOME=/app/oracle/product/10.1.0)
      (SID_NAME=sales)))

LISTENER2=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=us.acme.com)(PORT=1522))))

SID_LIST_LISTENER2=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=crm.us.acme.com)
      (ORACLE_HOME=/app/oracle/product/10.1.0)
      (SID_NAME=crm)))


To start the above listeners:
$ lsnrctl start listener1
$ lsnrctl start listener2


Best regards.

Frank
Re: two different listeners in the same server [message #67713 is a reply to message #67712] Mon, 24 January 2005 05:03 Go to previous messageGo to next message
Marcio
Messages: 2
Registered: January 2005
Junior Member
Hi Frank !

Thank you for your help...

One more question:

Is it possible to put your exemple in different files. I mean, for exemple, the listener1 in a f1.ora file and the listener2 in a f2.ora file ?

I so, how could I do this ?

Best regards,

Márcio.
Re: two different listeners in the same server [message #67714 is a reply to message #67713] Mon, 24 January 2005 10:05 Go to previous messageGo to next message
billh
Messages: 35
Registered: August 1999
Member
Hi Marcio,

Yes, it is possible to have two listener.ora files. To do this you must set the TNS_ADMIN parameter. I do this very thing because of the way that our failover is setup. Multiple listener.ora files each in a different directory. Upon startup I set the TNS_ADMIN parameter to the directory containing the listener.ora file for the listener that is starting.
Re: two different listeners in the same server [message #516445 is a reply to message #67711] Mon, 18 July 2011 03:51 Go to previous messageGo to next message
mr_wee
Messages: 18
Registered: June 2011
Junior Member
Hi guys,

I've another question :

Is it possible to bind 2 listeners on 2 different IPs on the server? for example LISTENER1 on xxx.xxx.xxx.1 IP and LISTENER2 on xxx.xxx.xxx.2? ( I need this because I have Applications that work with different IP range)
Re: two different listeners in the same server [message #516449 is a reply to message #516445] Mon, 18 July 2011 04:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, if you have 2 network interfaces.

Regards
Michel
Re: two different listeners in the same server [message #516456 is a reply to message #516449] Mon, 18 July 2011 04:48 Go to previous messageGo to next message
mr_wee
Messages: 18
Registered: June 2011
Junior Member
Dear Michel,

I have 2 network Interfaces but when I try to create second listener using netca utility, there isn't any section to introduce intended IP to listener. how can I do it?

Regards,
Wee
Re: two different listeners in the same server [message #516458 is a reply to message #516456] Mon, 18 July 2011 04:56 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use Notepad/vi and modify listener.ora to put IP and not name in HOST parameter.

Regards
Michel
Re: two different listeners in the same server [message #516791 is a reply to message #516458] Wed, 20 July 2011 22:21 Go to previous messageGo to next message
mr_wee
Messages: 18
Registered: June 2011
Junior Member
Thanks a lot Michel. It works for me. Smile
Re: two different listeners in the same server [message #516793 is a reply to message #516445] Wed, 20 July 2011 22:33 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Is it possible to bind 2 listeners on 2 different IPs on the server? for example LISTENER1 on xxx.xxx.xxx.1 IP and LISTENER2 on xxx.xxx.xxx.2?

While configuring 2 listener is possible, it is NOT preferred.
A single listener can listen on multiple hostname/IP# when properly configured.
Re: two different listeners in the same server [message #516867 is a reply to message #516793] Thu, 21 July 2011 04:14 Go to previous messageGo to next message
mr_wee
Messages: 18
Registered: June 2011
Junior Member

Quote:
While configuring 2 listener is possible, it is NOT preferred.


why you say this BlackSwan?
Re: two different listeners in the same server [message #518285 is a reply to message #67711] Tue, 02 August 2011 20:11 Go to previous messageGo to next message
musuoka
Messages: 2
Registered: July 2011
Junior Member
I think I really learned from this site a lot of important information and hope this site will be more to do better
Re: two different listeners in the same server [message #524310 is a reply to message #518285] Thu, 22 September 2011 21:51 Go to previous message
Guru007
Messages: 3
Registered: September 2011
Location: Aussie
Junior Member
Both Can be Used

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = au.us)(PORT = 2523)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = au.us)(PORT = 2523)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = au.us)(PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = au.us)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc) (ORACLE_HOME = /u00/app/oracle/product/10.2.0/Db_1) (PROGRAM = extproc))
(SID_DESC = (ORACLE_HOME = /u00/app/oracle/product/10.2.0/Db_1) (SID_NAME = DB1))
(SID_DESC = (ORACLE_HOME = /u00/app/oracle/product/10.2.0/Db_1) (SID_NAME= DB2))
)
Previous Topic: DBCA Installation through VPN
Next Topic: FRM-92102: A network error has occurred. The Forms Client has attempted to reestablish its connect
Goto Forum:
  


Current Time: Thu Mar 28 04:40:13 CDT 2024