RE: Instream SQL in an NT Batch script

  • From: "Sinats, Toby EBC:EX" <Toby.Sinats@xxxxxxxxxxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 23 Jul 2004 13:37:01 -0700

I believe Microsoft Windows Services for UNIX 3.5 is now free. 

From a white paper @ 

http://www.microsoft.com/windows/sfu/techinfo/overview/sfuwp2.asp



" Scripting
Windows Services for UNIX  3.5 includes both Korn Shell and C Shell
environments, more than 350 UNIX utilities, and Perl 5.6.1 compiled under
Interix. These give UNIX developers and administrators the broadest, most
familiar, and most compatible scripting environment possible. The utilities
include awk, grep, sed, tr, cut, tar, cpio, and a host of others, all of
which work as a UNIX user, administrator, or programmer expects. Also
included are more than 40 GNU utilities and compilers, including gawk, gcc,
g++, and g77."

Note, this is not an endorsement, I've never used the (W)SFU (unfortunate
acronym that it is), but MS centric colleagues are enthusiastic about it.


Toby Sinats

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Branimir Petrovic
Sent: Friday, July 23, 2004 1:23 PM
To: 'oracle-l@xxxxxxxxxxxxx'
Subject: RE: Instream SQL in an NT Batch script

> 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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: