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: Reza <reza_at_digital-dispatch.co.uk>
Date: Wed, 17 Nov 1999 18:48:34 -0000
Message-ID: <942864589.23929.0.nnrp-04.d4f07aaa@news.demon.co.uk>


Parveen
You can try



TMP= <os. filename>
TMPX= <os. filename>
SCRIPTFILE = <sql script file>
svrmgrl <<EOF >> $TMP
set echo on
spool $TMPX
connect internal
@ $SCRIPTFILE -- or any other in-line sql or plsql proc.

exit
EOF
cat $TMPX



Regards
Reza

Praveen Mohanan <praveen_mohanan_at_hotmail.com> wrote in message news:942861734.224930_at_sj-nntpcache-2.cisco.com...
> TO DBA GURUS,
>
>
> 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.
>
>
> Regards
>
>
Received on Wed Nov 17 1999 - 12:48:34 CST

Original text of this message

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