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: Help needed in Unix Shell Scripts

Re: Help needed in Unix Shell Scripts

From: Rolf Hauck <Rolf.Hauck_at_datenrevision.de>
Date: Thu, 10 Dec 1998 07:50:11 +0100
Message-ID: <366F6F23.59FBC68B@datenrevision.de>


Hi, try this:

# start of ksh-script
(

        echo export ORACLE_SID=$1
        echo svrmgrl
        echo connect internal
        echo shutdown immediate
        echo exit
        echo exit

) | su - oracle
# end of script

This is a very simple thing. You can call as "root" it with the SID of your instance as a parameter. Or you could hard code the SID in place of "$1".

HTH, Rolf

Kenny Leow schrieb:
>
> Hi,
>
> I need to write a shell script to login into my oracle from root, and do a
> shutdown. Can someone help me please?
>
> login for oracle=ora734
> password=oracle734
>
> Thanks a lot.
>
> Kenny
Received on Thu Dec 10 1998 - 00:50:11 CST

Original text of this message

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