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

  • From: Hans Forbrich <fuzzy.graybeard@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 13 May 2015 15:28:34 -0600

I know the documentation is difficult to find (http://docs.oracle.com -> Database -> All Database Documentation -> all Oracle Database books -> Net Services Reference) so here is a direct link to that setting, including an explanation. http://docs.oracle.com/database/121/NETRF/lsnrctl.htm#NETRF119

/Hans

On 13/05/2015 1:10 PM, Mandal, Ashoke wrote:


Hello Mladen, Thanks for the tips. I will try to use the korn shell. But could you help me in understanding the following syntax.

The syntax for disabling log_status of a default listener(LISTENER):

lsnrctl set log_status off

Could you please let me know what is the syntax for disabling log_status of an named listener (e.g listener_phx09db1)

lsnrctl set log_status off listener_phx09db1 -> This doesn’t work

Ashoke

*From:*oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Mladen Gogala
*Sent:* Wednesday, May 13, 2015 12:52 AM
*To:* oracle-l@xxxxxxxxxxxxx
*Subject:* Re: lsnrctl set log_status off doesn't work for a nmaed listener

* You don't have to stop logging to remove the logs. Just remove
it. Just do it.
* There is a utility called "logrotate" which was written for just
such things.
* Don't start your script with "#!/bin/csh". That is a very grave
style error. Scripts are started by "#!/usr/bin/env perl" or
"#!/usr/bin/perl -w". C-shell is a nightmare from the past that
should be forgotten, especially on Solaris which supports both
logrotate and the full complement of modern shells, like bash and
zsh. Even the old-fashioned Korn-shell is far better than C-shell
monstrosity.
* There is "ardrci" utility which supports "purge" command. I have
never used it on listener.log since logrotate completely satisfies
my needs as far as listener.log is concerned, but it works great
on the RDBMS homes and even allows you clean traces, cores and log
entries automatically.
* Did I forget to tell you never to use C-shell?



On 05/12/2015 05:09 PM, Mandal, Ashoke wrote:

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




--
Mladen Gogala
Oracle DBA
http://mgogala.freehostia.com

Other related posts: