I have the following listener.ora
file located in $ORACLE_HOME/network/admin/
:
TESTSID = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID_NAME = TESTSID)
)
)
When I run dbstart
, I am able to connect to some of the instances, but not the TESTSID
one specified. Also, there is no error when I change that listener.ora
to be an invalid entry.
When I run lsnrctl status
, the other instances are listed. After running lsnrctl stop
and lsnrctl start
I can no longer connect to any of them and they are missing when I check the status again. I believe that this means that the database instances are registering with the listener. However, when I run status both before and after restarting the listener, both state the following (which is the correct file):
Listener Parameter File /u01/app/oracle/product/12.0.1/dbhome_1/network/admin/listener.ora
How do I get it to work so that the listener.ora is the file that is used instead?
Best Answer
That is a TNS entry that should be in
tnsnames.ora
. Listener can't do anything with that. If you want to do static registration, this is what you should put inlistener.ora
: