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: Executing a SQL from svrmgr from command line

Re: Executing a SQL from svrmgr from command line

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Thu, 18 Nov 1999 08:20:52 +0200
Message-ID: <8105p2$6ot$1@ctb-nnrp1.saix.net>


Praveen Mohanan wrote in message
<942861734.224930_at_sj-nntpcache-2.cisco.com>...
> I wanted to execute one few commands from the command line & exit at the
>end. For eg
>
>1. invoke srvmgr
>2. connect internal
>3. run a SQL script
>4. exit
>
>How can i write this in a shell script, so that if i call the shell, it
will
>run all these command & come back to the prompt.

# usage : $0 <sqlscript>

svrmgrl << EOF
connect internal
@$1
exit
EOF
-- sample script --

To run the above script, assuming it's name is foo and we want to execute SQL script db_start.sql:
/home/oracle> foo db_start.sql

regards,
Billy Received on Thu Nov 18 1999 - 00:20:52 CST

Original text of this message

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