Wednesday, September 16, 2015

TNS-01251: Cannot set trace/log directory under ADR



[oracle@linux01 trace]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-SEP-2015 11:24:18

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current_listener LISTENER
Current Listener is LISTENER

LSNRCTL> set log_file listener1
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux01)(PORT=1521)))
TNS-01251: Cannot set trace/log directory under ADR 




Solution :


DIAG_ADR_ENABLED_LISTENER=OFF     -- >> add this line to you listener.ora


reload the listener.

$ lsnrctl reload 

Now lets try again to reset:

LSNRCTL> set current_listener LISTENER
Current Listener is LISTENER

LSNRCTL> set log_file /u01/app/oracle/diag/tnslsnr/linux01/listener/trace/listener1.log
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux01)(PORT=1521)))
LISTENER parameter "log_file" set to /u01/app/oracle/diag/tnslsnr/linux01/listener/trace/listener1.log
The command completed successfully

LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux01)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /u01/app/oracle/product/11.2/db_1/network/admin/listener.ora
Old Parameter File   /u01/app/oracle/product/11.2/db_1/network/admin/listener.bak
The command completed successfully

1 comment :

  1. CHANGING THE FOLLOWING LISTENER PARAMETER ALSO WORK " SAVE_CONFIG_ON_STOP_listener=true"

    ReplyDelete