Home » RDBMS Server » Networking and Gateways » How to limit the listener port that client can connect through tnsnames.ora?
icon5.gif  How to limit the listener port that client can connect through tnsnames.ora? [message #186123] Sun, 06 August 2006 04:05 Go to next message
sjyShen
Messages: 2
Registered: August 2006
Junior Member

There are many DBs on the same HP-UN platform server. I add another nondefault listener name and port number in the listener.ora file, allocate the different SID under the SID LIST description of the separate listener name. It's the purpose that I want to limit the client connect the instance through the port number where I defined in the listener.ora.
I have two questions:
(1)In my case I think the client can connect the FMS through the 1523 port only, but I can connect FMS through 1521 and 1523 port using the tnsnames.ora.
(2)Why all the DBs auto register to the TSTDB listener port 1521, even it has not defined under the SID LIST description area? I think that's the cause why the FMS can connect the 1521 and 1523 port.

The listener.ora contents as following:
#########################################
# LISTENER.ORA Network Configuration File: /usr/oracle/app/oracle/product/9.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.
TSTDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.31)(PORT = 1521))
)
)
)
SID_LIST_TSTDB =
(SID_LIST =
(SID_DESC =
(SID_NAME = FMSDEV)
(ORACLE_HOME = /usr/oracle/app/oracle/product/9.2.0)
)
(SID_DESC =
(SID_NAME = FMSDEV_C)
(ORACLE_HOME = /usr/oracle/app/oracle/product/9.2.0)
)
)

FMS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.31)(PORT = 1523))
)
)
)
SID_LIST_FMS =
(SID_LIST =
(SID_DESC =
(SID_NAME = FMS)
(ORACLE_HOME = /usr/oracle/app/oracle/product/9.2.0)
)
)

FMS_C =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.31)(PORT = 1525))
)
)
)

SID_LIST_FMS_C =
(SID_LIST =
(SID_DESC =
(SID_NAME = FMS_C)
(ORACLE_HOME = /usr/oracle/app/oracle/product/9.2.0)
)
)
####### Tne end of the listener.ora
############################################################################

As following is the listeners status:

oracle> lsnrctl status

LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Production on 06-AUG-2006 11:32:25

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias TSTDB
Version TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Pro
duction
Start Date 04-AUG-2006 15:36:20
Uptime 1 days 19 hr. 56 min. 4 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /usr/oracle/app/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /usr/oracle/app/oracle/product/9.2.0/network/log/tstdb.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.31)(PORT=1521)))
Services Summary...
Service "FMS" has 1 instance(s).
Instance "FMS", status READY, has 1 handler(s) for this service...
Service "FMSDEV" has 2 instance(s).
Instance "FMSDEV", status UNKNOWN, has 1 handler(s) for this service...
Instance "FMSDEV", status READY, has 1 handler(s) for this service...
Service "FMSDEV_C" has 2 instance(s).
Instance "FMSDEV_C", status UNKNOWN, has 1 handler(s) for this service...
Instance "FMSDEV_C", status READY, has 1 handler(s) for this service...
Service "FMS_C" has 1 instance(s).
Instance "FMS_C", status READY, has 1 handler(s) for this service...
The command completed successfully3333#33
############################################################################

oracle> lsnrctl status fms

LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Production on 06-AUG-2006 11:40:56

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.31)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias FMS
Version TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Pro
duction
Start Date 04-AUG-2006 15:36:02
Uptime 1 days 20 hr. 4 min. 53 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /usr/oracle/app/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /usr/oracle/app/oracle/product/9.2.0/network/log/fms.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.31)(PORT=8131)))
Services Summary...
Service "FMS" has 1 instance(s).
Instance "FMS", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
############################################################################

oracle> lsnrctl status fms_c

LSNRCTL for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Production on 06-AUG-2006 11:41:31

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.31)(PORT=1525)))
STATUS of the LISTENER
------------------------
Alias FMS_C
Version TNSLSNR for Compaq Tru64 UNIX: Version 9.2.0.7.0 - Pro
duction
Start Date 04-AUG-2006 15:36:11
Uptime 1 days 20 hr. 5 min. 20 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /usr/oracle/app/oracle/product/9.2.0/network/admin/lis
tener.ora
Listener Log File /usr/oracle/app/oracle/product/9.2.0/network/log/fms_c
.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.1.31)(PORT=9131)))
Services Summary...
Service "FMS_C" has 1 instance(s).
Instance "FMS_C", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Re: How to limit the listener port that client can connect through tnsnames.ora? [message #186136 is a reply to message #186123] Sun, 06 August 2006 06:57 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
I think your tnsnames.ora on the server and the client must match (service_names, sid, port, ...) You must start all three listeners before connecting.
Re: How to limit the listener port that client can connect through tnsnames.ora? [message #186334 is a reply to message #186136] Mon, 07 August 2006 09:34 Go to previous message
sjyShen
Messages: 2
Registered: August 2006
Junior Member
Thanks for your reply, I'm sorry for the port number not consisten between listener.ora contents and lsnrctl status message that's my mistake when paste the text.

tnsnames.ora on the server and the client must match (service_names, sid, port, ...), do you meaning the port and sid in tnsname.ora on the clietn must match the listener.ora on the server? I think if the port or sid not match will get the ORA-12514 error when attempted to connect the DB from client.

If many different listener name defined in the listener.ora, I think the instance can only registered which listener name that has its sid name under the SID_LIST_LISTENER, then the client can only define the match port,sid in tnsname.ora on client.

The fact that the instance can auto registered with the listener port that SID_LIST_LISTENER without its name, so I'm confuse, my concept is wrong? or my configure has defect that I don't know?

Previous Topic: MYSTERY ORACLE MULTIPLE HOME
Next Topic: ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
Goto Forum:
  


Current Time: Sat Dec 03 01:03:04 CST 2016

Total time taken to generate the page: 0.08384 seconds