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: svrmgrl question

Re: svrmgrl question

From: Scott Weiner <sweiner_at_infinata.com>
Date: Fri, 02 Mar 2001 19:31:39 GMT
Message-ID: <3A9FF378.F017F2E@infinata.com>

Thanks!

Kevin Brand wrote:

> using a shell wrapper ( unix or MKS Toolkit in windows ), construct the sql
> statement and feed it to svrmgrl via a HERE document.
>
> :
> #
> # Shell script start
> CONNECT=scott/tiger
> TABLE_NAME=$1
> SQLSTMT="select * from $TABLE_NAME"
> TNS_SERVICE=""
> #TNS_SERVICE="@tnsservice"
>
> # Assuming your Oracle Environment is set:
> $ORACLE_HOME/bin/svrmgrl <<EOT
> connect ${CONNECT}${TNS_SERVICE};
> ${SQLSTMT};
> EOT
>
> # Shell script end
>
> If script name is "runit" and is executable, callit like this...
> runit <table_name>
>
> That is minimal and you probably should start using SQL*PLUS, but it's a
> good starting point.
>
> -Kevin
>
> "Scott Weiner" <sweiner_at_infinata.com> wrote in message
> news:3A9FC85C.F868FAAA_at_infinata.com...
> > I want to execute a sql script: Test.sql using svrmgrl.
> >
> > In the Test.sql there are some values that I would like ot have passed
> > in as paramters.
> >
> > For instance:
> > SELECT * FROM TABLE_NAME
> >
> > WHat syntax do I use to pass TABLE_NAME in as a call to svrmgrl?
> >
> > Note I am doing this as a batch process so it has to be a single command
> > line.
> >
> > Thanks!
> >
  Received on Fri Mar 02 2001 - 13:31:39 CST

Original text of this message

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