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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Instream SQL in an NT Batch script

RE: Instream SQL in an NT Batch script

From: Branimir Petrovic <BranimirP_at_cpas.com>
Date: Fri, 23 Jul 2004 16:23:22 -0400
Message-ID: <33678E78A2DD4D418396703A750048D401024EF6@RIKER>


> I am trying to move a couple of Unix scripts to an NT server. I know
> just about everything needs to change but the scripts use in
> stream SQL
> commands and for some reason NT doesn't like the syntax.
>
> The code is simple just like:
> sqlplus / <<EOF
> select something from somewhere;
> EOF
>
> It complains and says <<EOF not expected here. =20
> Works on Unix and Linux.
>
> What am I missing?

What you are missing on NT is decent scripting language (and no, VB Script aint it either).

Sooner you shake off DOS-batch-ing from your mind, sooner you'll be able to "do stuff" you want or need to do...

By default - anything you try to do via DOS batch will be:

 Ugly: read as "unreadable and hard to maintain"

 Kludgey: to get DOS batch to do lots of things - you'll have to

            wrap your mind around insane constructs

 Unreliable: there are ahem, slight but very gotcha differences

             between DOS shells across various Win platforms

What I'd do if I had lots of "streamed" scripts I'd want to share between Unix and Windows - I'd rewrite 'em all in Python (or Perl if only I knew it;-) and run one and same set of scripts on both "ends", or write small Python (or Perl) parser and stream existing sql stuff into Python/Perl script that will do the job.

Branimir



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Jul 23 2004 - 15:20:12 CDT

Original text of this message

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