Author: Dick Edison
Database Administrators usually remove or rename the log files when your listener.log file is grown. However if you rename (mv) or remove the listener.log file then in most scenarios the listener stop logging information to the logfile.
Today we will discuss how to troubleshoot this problem by re-establishing the logging of your listener.
Turn Off Listener Logging Permanently:
You can permanently turn off listener logging by modifying the listener.ora file and setting LOGGING_* YOUR LISTENER *=OFF
Turn Off Listener Logging Temporarily:
You can temporarily turn off listener logging by running below command from LSNRCTL prompt.
LSNRCTL>SET LOGGING_*YOUR LISTENER *=OFF
Getting Listener Logging Status:
You can get the current listener logging status by running below command from LSNRCTL prompt.
LSNRCTL>SHOW LOG_STATUS
Deleting Listener Log File after Renaming:
You can delete the listenr.log file by renaming it first by running below commands from LSNRCTL prompt.
LSNRCTL>SET LOG_STATUS OFF
MV LISTENER.LOG TO LISTENEROLD.LOG
LSNRCTL>SET LOG_STATUS ON
If you run the MV LISTENER.LOG command without first shutting down the listener then it will interfere with the logging process. As a result your listener logging will stop even if the LOG_STATUS is turned ON.
Re-establishing Listener Logging:
You can re-establish listener logging by following below approaches.
Re-start Listener:
You can re-establish Listener logging by re-starting your listener. However this approach has the problem of taking an outage.
Switching Log Status:
In this approach to re-establish your listener logging you will need to turn off log and then turn it on again.
$ RM LISTENER.LOG
$ TOUCH LISTENER.LOG
$ LS -L LISTENER.LOG
-RW-R–R– 1 ORACLE OINSTALL 0 MAY 06 10:46 LISTENER.LOG
$ ORACLE_HOME/BIN/LSNRCTL
LSNRCTL> SET LOG_STATUS OFF
CONNECTING TO (DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=44.01.1055)(PORT=2065)))
LISTENER PARAMETER “LOG_STATUS” SET TO OFF
The command completed successfully
LSNRCTL> SET LOG_STATUS ON
CONNECTING TO (DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=44.01.1055)(PORT=2065)))
LISTENER PARAMETER “LOG_STATUS” SET TO ON
The command completed successfully
LSNRCTL> EXIT
$ LS -L LISTENER.LOG
-RW-R–R– 1 ORACLE OINSTALL 553 MAY 06 10:53 LISTENER.LOG Read Again!!
More Oracle Articles, Database Articles and DBA Tips
Database Security: Step by step guideline
DBA Tips for Oracle Regular Expressions!!
The Secrets of Single-Set Aggregates for DML Statements!!
DBA Tips for Finding Oracle Log Files in Oracle R12!!
Best Practice for Multiple Oracle Homes!
|