Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: lsnrctl commands

RE: lsnrctl commands

From: Mercadante, Thomas F \(LABOR\) <>
Date: Tue, 27 Feb 2007 08:03:33 -0500
Message-ID: <ABB9D76E187C5146AB5683F5A07336FFE08B9A@EXCNYSM0A1AJ.nysemail.nyenet>

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


This transmission may contain confidential, proprietary, or privileged information which is intended solely for use by the individual or entity to whom it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure, dissemination, copying or distribution of this transmission or its attachments is strictly prohibited. In addition, unauthorized access to this transmission may violate federal or State law, including the Electronic Communications Privacy Act of 1985. If you have received this transmission in error, please notify the sender immediately by return e-mail and delete the transmission and its attachments.

-----Original Message-----

[] On Behalf Of Tony van Lingen Sent: Monday, February 26, 2007 10:43 PM To: Smith.Steven_at_DOL.GOV
Subject: Re: lsnrctl commands

On unix:

$ lsnrctl <<EOF
 > set password pa55w0rd
> show log_directory


In windows I don't think you get it to work - unless you use Cygwin...but that would be cheating :)


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.

Received on Tue Feb 27 2007 - 07:03:33 CST

Original text of this message