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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: automatic startup and shutdown of LISTENER

RE: automatic startup and shutdown of LISTENER

From: William Dong <William_Dong_at_nylim.com>
Date: Wed, 14 Feb 2001 06:24:01 -0800
Message-ID: <F001.002B3D94.20010214062053@fatcity.com>

Viraj:

Looks like you are playing with Unix scripting. I am not good at this. I just have two thinking:
1. Why you su to users other than "oracle", unable to see any necessarity. 2. Even you really want replace oracle user, just replace it with another userid in the syntax. Remember

    this is automatic startup or shutdown, you do'nt want to interact with the scripts. Just try this:

   su - USERID -c $ORACLE_HOME/bin/lsnrctl <<eof  start listener
 exit
 eof
I know this may not answer your question, but this is more reasonable.

William Dong

|--------+----------------------->

| | "Viraj |
| | Luthra" |
| | <viraj999_at_lyc|
| | os.com> |
| | |
| | 02/14/01 |
| | 01:05 AM |
| | Please |
| | respond to |
| | ORACLE-L |
| | |
|--------+-----------------------> >----------------------------------------------| | | | To: Multiple recipients of list | | ORACLE-L <ORACLE-L_at_fatcity.com> | | cc: (bcc: William Dong/New York | | Life Asset Management) | | Subject: RE: automatic startup and | | shutdown of LISTENER | >----------------------------------------------|

Hello,

 If I want to achieve the following in a shell script, how can I do that:-

I put the following in a shell:-

USERID=$1
PASSWD=$2
su - $USERID -c $ORACLE_HOME/bin/lsnrctl <<eof start listener
exit
eof

But then when I run the program, by

test oracle8 passwd

, the script expects the password to be passed, I dont want that. Is there any way I can pass the password at command prompt and the unix shell will get that and not ask for entering the password?

Do you get what I need?

Regards,

raja

--

On Tue, 13 Feb 2001 12:56:48
 William Dong wrote:
>The following may work:
>
>su - oracle -c $ORACLE_HOME/bin/lsnrctl <<eof
>start listener
>exit
>eof
>
>
>
>
>
>
>
>|--------+----------------------------->
>|        |          "Elliott, Patrick" |
>|        |          <Patrick.Elliott_at_be|
>|        |          stbuy.com>         |
>|        |                             |
>|        |          02/13/01 03:03 PM  |
>|        |          Please respond to  |
>|        |          ORACLE-L           |
>|        |                             |
>|--------+----------------------------->
>  >-----------------------------------------------------|
>  |                                                     |
>  |       To:     Multiple recipients of list ORACLE-L  |
>  |       <ORACLE-L_at_fatcity.com>                        |
>  |       cc:     (bcc: William Dong/New York Life Asset|
>  |       Management)                                   |
>  |       Subject:     RE: automatic startup and        |
>  |       shutdown of LISTENER                          |
>  >-----------------------------------------------------|
>
>
>
>
>Change the command to
>
>su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
>
>You need the double quotes I believe.
>
>> -----Original Message-----
>> From:         Van M. Etheridge [SMTP:VanE_at_UANET.ORG]
>> Sent:         Monday, February 12, 2001 10:13 AM
>> To:           Multiple recipients of list ORACLE-L
>> Subject:           automatic startup and shutdown of LISTENER
>>
>> I would like to be able tostartup and shutdown the listener when my SA
>> shutsdown and brings the Unix box back up. What happens when my SA brings
>> up
>>
>> the OS is that he gets the lsnrctl prompt rather than listener starting.
>> He
>> can then type the start command and listerner starts. But it should start
>> without him having to key in the command.
>> I have the following in both the  /etc/init.d/dbstart and
>> /etc/rc2.d/s99dbstart  files:
>> su - oracle -c $ORACLE_HOME/bin/ lsnrctl start
>> (I use the default listener name "LISTENER")
>> Sun SPARC Solaris OS 2.4
>> Oracle7 ServerRelease 7.3.4.0.1 - Production
>> With thedistributed, parallel query and Spatial Data options
>> PL/SQL Release 2.3.4.0.0 - Production
>>
>>
>>
>>
>> --
>> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> --
>> Author: Van M. Etheridge
>>   INET: VanE_at_UANET.ORG
>>
>> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>> San Diego, California        -- Public Internet access / Mailing Lists
>> --------------------------------------------------------------------
>> To REMOVE yourself from this mailing list, send an E-Mail message
>> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>> the message BODY, include a line containing: UNSUB ORACLE-L
>> (or the name of mailing list you want to be removed from).  You may
>> also send the HELP command for other information (like subscribing).
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Elliott, Patrick
>  INET: Patrick.Elliott_at_bestbuy.com
>
>Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>San Diego, California        -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from).  You may
>also send the HELP command for other information (like subscribing).
>
>
>
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: William Dong
>  INET: William_Dong_at_nylim.com
>
>Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>San Diego, California        -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from).  You may
>also send the HELP command for other information (like subscribing).
>


Get your small business started at Lycos Small Business at
http://www.lycos.com/business/mail.html
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Viraj Luthra
  INET: viraj999_at_lycos.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: William Dong
  INET: William_Dong_at_nylim.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Feb 14 2001 - 08:24:01 CST

Original text of this message

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