lsnrctl set log_status off doesn't work for a nmaed listener

From: Mandal, Ashoke <ashoke.k.mandal_at_medtronic.com>
Date: Tue, 12 May 2015 21:09:55 +0000
Message-ID: <DD179917255B1146B9367DC5E7C0DDB0022D5FC2_at_MSPM1BMSGM41.ent.core.medtronic.com>



Hello,

I am trying to recycle the listener.log for the listener on the database server using cshell script but it is not working for me. Any help is highly appreciated.

Thanks,
Ashoke
The crontab entry:
#Delete the old files from adump, bdump, cdump, udump and recycle the listener log.
0 5 * * 0 /admin/install/dmas/shell_scripts/cleanup/oracle_clean_dmas_server.csh tlwdmas phx09db1 > /dev/null 2>&1 oracle_clean_dmas_server.csh <db_name> <virtual_server_name>

The content of the oracle_clean_dmas_server.csh script:

#!/bin/csh -v

setenv ORACLE_SID $1
setenv SERVER $2
setenv ORAENV_ASK NO
. /usr/local/bin/coraenv

cd $ORACLE_HOME/network/log
lsnrctl set CURRENT_LISTENER listener_$SERVER lsnrctl set log_status off
mv listener_$SERVER.log listener_$SERVER.old lsnrctl set log_status on

The errors:
cd $ORACLE_HOME/network/log
lsnrctl set CURRENT_LISTENER listener_$SERVER

LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 12-MAY-2015 13:47:01

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

Current Listener is listener_phx09db1
lsnrctl set log_status off

LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 12-MAY-2015 13:47:01

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Solaris Error: 146: Connection refused mv listener_$SERVER.log listener_$SERVER.old mv: cannot access listener_phx09db1.log

lsnrctl set log_status on
LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 12-MAY-2015 13:37:11

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Solaris Error: 146: Connection refused

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records.  

To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 12 2015 - 23:09:55 CEST

Original text of this message