lsnrctl status ${LISTENER_NAME}
To get a list of running listeners on a UNIX server use:
ps -ef | grep tns | grep oracle | grep -v grep
tnsping mynetservicename
trcroute mynetservicename
lsnrctl start ${LISTENER_NAME}
lsnrctl stop ${LISTENER_NAME}
If you change the LISTENER.ORA you can reload the configuration without a full stop/start...
lsnrctl reload ${LISTENER_NAME}
This minimises any disruption but note that "the database services, instances, service handlers, and listening endpoints that were dynamically registered with the listener will be unregistered and subsequently registered again." (1)
You should explicitly tell the database which Listener to interact with using the LOCAL_LISTENER parameter...
ALTER SYSTEM SET LOCAL_LISTENER = "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost)(PORT=1521)))" SCOPE=BOTH;
For 11.2.0.4 and above, see COST and VNCR in LISTENER.ORA. For 11.2.0.3 and earlier, consider using PROTOCOL=ipc (see below).You can check what the value should be using...
lsnrctl stat ${LISTENER_NAME} | grep tcp
ALTER SYSTEM SET LOCAL_LISTENER = "(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))" SCOPE=BOTH;
The benefit of setting LOCAL_LISTENER to use the IPC protocol is that your database will only dynamically register with a listener on the same server. However, this will complicate any Data Guard configuration. This is the recommended mitigation for CVE-2012-1675 in 11.2.0.3 and earlier. For 11.2.0.4 and later, use TCP and see COST and VNCR in LISTENER.ORA.You can check what the value should be using...
lsnrctl stat ${LISTENER_NAME} | grep ipc
Recommended value is empty i.e. ''
SELECT UPPER(VALUE)
FROM V$SYSTEM_PARAMETER
WHERE UPPER(NAME)='REMOTE_LISTENER'
AND VALUE IS NOT NULL;
Multi-Tenant Version...
SELECT DISTINCT UPPER(V.VALUE),
DECODE (V.CON_ID,0,(SELECT NAME FROM V$DATABASE),
1,(SELECT NAME FROM V$DATABASE),
(SELECT NAME FROM V$PDBS B WHERE V.CON_ID = B.CON_ID))
FROM V$SYSTEM_PARAMETER V
WHERE UPPER(NAME) = 'REMOTE_LISTENER'
AND VALUE IS NOT NULL;
ALTER SYSTEM SET REMOTE_LISTENER = '' SCOPE = SPFILE;
TNS-01106: Listener Using Listener Name Has Already Been Started
Two listeners cannot have the same port. Check that another listener is not already listening on the port specified.
TNS-01198: Listener failed to initialize valid node list
On 12c...
lsnrctl start
Listener failed to start (see the error message above). Things work fine using 11g listener with the same configuration.
TNS-12516: TNS:listener could not find available handler with matching protocol stack
This is often due to hitting the instance PROCESS limit.
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
This normally means that the service you are trying to connect to is not running on this server. In a load balanced configuration you might expect this (e.g a setup where the clients are configured to try all Data Guard nodes so that they work without alteration after a failover/switchover).
WARNING: Subscription for node down event still pending
Relates to ONS. Set to OFF in non-RAC environments.