Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: lsnrctl command

Re: lsnrctl command

From: Gerard H. Pille <ghp_at_skynet.be>
Date: Thu, 23 Aug 2001 22:14:42 +0200
Message-ID: <3B856432.AA335715@skynet.be>


Bryant wrote:
>
> "Gerard H. Pille" <ghp_at_skynet.be> wrote in message news:<3B84260A.5CF18AF7_at_skynet.be>...
> > Bryant wrote:
> > >
> > > I am attempting to create a simple script to move the listener log
> > > file on a monthly basis. If the listener has not been named the
> > > command is simple
> > >
> > > lsnrctl set log_file log_file_name
> > >
> > > But if the listener has been named(no longer default of LISTENER) and
> > > I run the same command I get an error. I believe I need to put the
> > > listener name into the command but, I cannot seem to get the corrct
> > > syntax. Any suggestions.
> > >
> > > Thanks,
> > > B
> >
> > The manual says to do it this way, it's not possible on one
> > command-line:
> >
> > lsnrctl << -oef-
> > set current_listener listener_two
> > set log_file listener_two.log
> > exit
> > -oef-
> >
> > With me, on Debian Linux with Oracle9i, it works but gives a memory
> > fault when exiting.
>
> Just like to say thanks for the suggestions. I gave this a try
>
> lsnrctl << -oef-
> > set current_listener listener_two
> > set log_file listener_two.log
> > exit
> > -oef-
>
> and it worked. The only problem is that I am trying to pass the date
> in as part of the name. This might be possible but I think just
> moving the old file and passing it the date will do the same thing.
>
> Thanks again
> B

Oh, I really dig people that say thanks, as I do everything that is rare.

Therefore: (there is a little "-" added to -oef-, allows you to indent with tabs)

export DATE=`date '+%Y%M%d'`
lsnrctl <<--oef-

	set current_listener listener_two
	set log_file listener_two$DATE.log
	exit
	-oef-

Don't forget to check the log directory after a couple of years.

-- 

Gerard H. Pille
Received on Thu Aug 23 2001 - 15:14:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US