Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: lsnrctl commands
I have been able to get multiple commands to go into the lsnrctl command
using:
lsnrctl << EOF
set password $LSNR_PASS
show log_directory
exit
EOF
I was hoping to be able to get the commands on 1 line so that I could
redirect the output through awk and mine the directory and name
information.
Honestly, it's a 'nice to have' and not a requirement because the $ORACLE_HOME and the listener.log names are consistent across servers here.
Steve Smith
Envision Technology Partners / MSHA MSIS Team
Desk: 303-231-5499
-----Original Message-----
From: Mercadante, Thomas F (LABOR)
[mailto:Thomas.Mercadante_at_labor.state.ny.us]
Sent: Tuesday, February 27, 2007 6:04 AM
To: tony.vanlingen_at_epa.qld.gov.au; Smith, Steven K - MSHA
Cc: oracle-l_at_freelists.org
Subject: RE: lsnrctl commands
You can get it to work on NT or Unix by echoing your commands into a temporary file and then passing that file into lsnrctl
echo set password pa55w0rd > lsn.cmd echo show log_directory >> lsn.cmd echo exit >> lsn.cmd
lsnrctl < lsn.cmd
Tom
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Tony van Lingen
Sent: Monday, February 26, 2007 10:43 PM
To: Smith.Steven_at_DOL.GOV
Cc: oracle-l_at_freelists.org
Subject: Re: lsnrctl commands
On unix:
$ lsnrctl <<EOF
> set password pa55w0rd
> show log_directory
> EOF
...
In windows I don't think you get it to work - unless you use Cygwin...but that would be cheating :)
Cheers,
Tony
Smith, Steven K - MSHA wrote:
> Is there any way to run multiple lsnrctl commands on the same command > line? Our listeners are password protected. I'm putting together a > script to rotate the logs and I want to dynamically pull the log > directory and file name from the lsnrctl utility. I'm having trouble > finding the syntax to execute both the set password and the show > log_directory on the same lsnrctl command prompt.
> for an example of what I'm trying to accomplish:
> lsnrctl set password pa55w0rd show log_directory
> But this syntax doesn't work past the 'set password'
> Thanks
> > Steve Smith > > Envision Technology Partners / MSHA MSIS Team > > Desk: 303-231-5499 >
WARNING: This e-mail (including any attachments) has originated from a Queensland Government department and may contain information that is confidential, private, or covered by legal professional privilege, and may be protected by copyright.
You may use this e-mail only if you are the person(s) it was intended to be sent to and if you use it in an authorised way. No one is allowed to use, review, alter, transmit, disclose, distribute, print or copy this e-mail without appropriate authority. If you have received this e-mail in error, please inform the sender immediately by phone or e-mail and delete this e-mail, including any copies, from your computer system network and destroy any hardcopies.
Unless otherwise stated, this e-mail represents the views of the sender and not the views of the Environmental Protection Agency.
Although this e-mail has been checked for the presence of computer viruses, the Environmental Protection Agency provides no warranty that all viruses have been detected and cleaned. Any use of this e-mail could harm your computer system. It is your responsibility to ensure that this e-mail does not contain and is not affected by computer viruses, defects or interference by third parties or replication problems (including incompatibility with your computer system).
E-mails sent to and from the Environmental Protection Agency will be electronically stored, managed and may be audited, in accordance with the law and Queensland Government Information Standards (IS31, IS38, IS40, IS41 and IS42) to the extent they are consistent with the law.
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Tue Feb 27 2007 - 09:49:59 CST
![]() |
![]() |