| Lesson 5 | Oracle Listener Operation |
| Objective | Describe how LSNRCTL interacts with listener.ora to control the listener process. |
Oracle provides a command-line utility called LSNRCTL (Listener Control) to administer the listener process. The utility interacts with the listener using the configuration provided in the listener.ora file.
lsnrctl from $ORACLE_HOME/bin or from any path with Oracle binaries in $PATH.listener.ora file from the directory specified by the TNS_ADMIN environment variable. If TNS_ADMIN is not set, it defaults to $ORACLE_HOME/network/admin on UNIX or ORACLE_HOME\network\admin on Windows.
lsnrctl command [listener_name]
If no listener name is specified, Oracle assumes LISTENER by default.
Interactive Prompt Usage:
lsnrctl
LSNRCTL> command [listener_name]
To exit the prompt, use: EXIT or QUIT.
Batch Mode Execution:
Create a command file and run:
lsnrctl @filename
Use `REM` or `#` to comment lines inside the file. All other lines will be interpreted as commands. No confirmation prompts are required in batch mode.
listener.ora in the directory specified by the TNS_ADMIN environment variable.$ORACLE_HOME/network/admin on UNIX or ORACLE_HOME\network\admin on Windows.tnsnames.ora if configured as a naming method.If the listener name is LISTENER and cannot be resolved using the above methods, Oracle assumes the default address: TCP/IP on port 1521.
START, STOP, RELOADSTATUS, SERVICES, SHOW LOG_FILESET, SET TRC_LEVELEXIT, QUIT, HELPlistener.ora configuration: