Tuesday, May 9, 2023

TNS-12508: TNS:listener could not resolve the COMMAND given

If you are in process of rotating listener log file  and you receive TNS-12508 while disabling log_status, this means you have imposed admin restrictions in listener log file for this listener. Same error would be returned for any other settings you would want to change using “set” command from lsnrctl utility. In the following I have reproduced this error and explained how to set and unset admin restrictions in listner log file.

Rotating Listener Log File

Rotating database log files is a common and day-to-day practice for DBAs. Rotation of logs is a process whereby we rename (and archive/compress) current log files so that new log files get created. Listener’s log file is also part of this practice because size of listener log file increases very fast, and it may increase beyond several GBs within a couple of months. If listener log file is not rotated, this may sometimes cause initial connection to database become slow. Therefore, this is very important to rotate listener log file. In the following I will explain how we rotate listener log file.

Popular Posts - All Times