ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epel...@echoman.com (Edward Peloke)
Subject RE: using set command in the sql task
Date Fri, 02 Apr 2004 22:13:26 GMT
Thanks David,

That was my next move.  I was hoping to get it to work without using sql
plus.  The bad part about using SQL plus is that it won't fail on a sql
error...correct?  I will need to somehow parse through the output looking
for an error message to know there was a problem.

Thanks,
Eddie

-----Original Message-----
From: Harkness, David [mailto:DHarkness@sonypictures.com]
Sent: Thursday, April 01, 2004 4:52 PM
To: Ant Users List
Subject: RE: using set command in the sql task


Edward Peloke wrote:
> I am using the sql task to run a script into my ORacle db.
> The script runs fine unless I use a Set command such as
>
> SET DEFINE ON, etc.  IF those are in the scripts, I get an
> invalid option error.

It is my understanding that the <sql> task actually uses JDBC directly
to issue your queries and such -- it doesn't go through SQL*Plus.

> How can I get around this?

You can call SQL*Plus directly with the following.

    <exec executable="sqlplus" output="db-init-lookup-identity.log">
        <arg value="-S"/>
        <arg value="${db.user}/${db.pwd}@${db.sid}"/>
        <arg value="@script.sql"/>
    </exec>

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message