Path: news.easynews.com!easynews!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed.media.kyoto-u.ac.jp!news-west.eli.net!not-for-mail
Message-ID: <3CFFD1AF.2FFEAA70@exesolutions.com>
From: Daniel Morgan <dmorgan@exesolutions.com>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.misc
Subject: Re: Call SQL script from Windows .bat file **NEWBIE**
References: <ufv4gi7p1v2ja9@corp.supernews.com> <ufvirv2fhhmfb0@corp.supernews.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 42
Date: Thu, 06 Jun 2002 21:18:48 GMT
NNTP-Posting-Host: 156.74.250.7
X-Complaints-To: yvonne.tracy@ci.seattle.wa.us
X-Trace: news-west.eli.net 1023398328 156.74.250.7 (Thu, 06 Jun 2002 15:18:48 MDT)
NNTP-Posting-Date: Thu, 06 Jun 2002 15:18:48 MDT
Organization: City of Seattle NewsReader Service
Xref: easynews comp.databases.oracle.misc:82601
X-Received-Date: Thu, 06 Jun 2002 14:16:14 MST (news.easynews.com)

Sybrand Bakker wrote:

> "Andrew King" <kingster_1969@hotmail.com> wrote in message
> news:ufv4gi7p1v2ja9@corp.supernews.com...
> > I am currently trying to call a SQL*Plus script from a Windows batch file.
> > I have figured it all out, except for one little piece - I need an error
> > code returned to the %errorlevel% environment variable if there is a
> problem
> > in the execution of the script/stored proc.
> >
> > This is what I have so far in my batch file:
> >
> > set ORACLE_SID=edwm
> > set ORACLE_HOME=d:\oracle\ora81ee
> > D:
> > cd D:\ora\edwm\whs\sql
> > d:\oracle\ora81ee\bin\sqlplus username/password @whsverify.sql
> >
> > I have seen things in some scripts/stored procs that I have looked at like
> > "whenever sqlerror exit SQL.SQLCODE".  Will this do what I am looking for?
> >
> > Thanks,
> >
> > Andy
> >
> >
>
> What does the explanation of whenever sqlerror in your sql*plus
> documentation say?
>
> Regards
>
> --
> Sybrand Bakker
> Senior Oracle DBA
>
> to reply remove '-verwijderdit' from my e-mail address

Asking someone to look at the documentation ... have you no shame? <g>

Daniel Morgan

