No matter what the listener names are, by default pmon registers itself to the listener on 1521. There can be only one listener on a given port.
To register with a different port and listener alias, four changes need to be made:
1. Set up a listener in listener.ora and give it a non-default name and bind it to port other than 1521, e.g. 1522
mydb_LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.domain.com)(PORT = 1522))
)
2. Add above entry to tnsnames.ora too as an alias
3. set local_listener entry in initmydb.ora file so pmon knows which listener alias to register with:
local_listener=mydb_LISTENER
4. Finally, as you will have to do normally, add tnsnames entry for the service itself to your client machine tnsnames.ora:
mydb.domain.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.domain.com)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = mydb.lordabbett.com))
)
Tags: Oracle Listener