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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Remote Execution?

Re: Remote Execution?

From: John P. Higgins <jh33378nospam_at_deere.com>
Date: 1997/09/28
Message-ID: <342F171C.2202@deere.com>#1/1

Brian Camper wrote:
>
> I am in the need to run a sequel statement against an Oracle 7.3.3.0.0
> database table. I need to know if there is a way through a command line to
> execute a query by passing in the sql statement and also redirecting the
> output to a file.
>
> For example in Sybase, there was a REXEC command that allowed this feature.
>
> REXEC "select * from table" > c:\output.txt
>
> Thanks you in advance.
>
> Brian Camper
>
> brianc_at_cmhc.com

Try this:

sqlplus -s <<EOF1
userid/password_at_remote.domain.com
spool output.txt
select * from table;
spool off
exit
EOF1

-- 
John P. Higgins      Voice:    (309)765-7868
Deere & Company      Fax:      (309)765-7800
John Deere Road      Internet: jh33378nospam_at_deere.com
Moline, IL 61265     Opinions: My Own
Received on Sun Sep 28 1997 - 00:00:00 CDT

Original text of this message

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