ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob H - VSCM" <Anderson....@vectorscm.com>
Subject RE: Writing a DB2 Java Stored Procedure compiling task
Date Tue, 07 Jan 2003 18:22:32 GMT
I would think you could deploy a package or stored procedure with the sql
task, but it does not appear to be the case. I get an error message that
says:

BUILD FAILED
file:C:/cygwin/home/rhanderson/work/build_lib.xml:51: java.sql.SQLException:
ORA-00900: invalid SQL
statement

Normally we run sqlplus to load the code as follows:
sqlplus user/pass@database @package_body.sql


-----Original Message-----
From: Antoine Levy-Lambert [mailto:levylambert@tiscali-dsl.de]
Sent: Tuesday, January 07, 2003 9:24 AM
To: Ant Users List
Subject: Re: Writing a DB2 Java Stored Procedure compiling task


Deploying stored proc should be possible with the ant SQL task.
Antoine
----- Original Message -----
From: "Anderson, Rob H - VSCM" <Anderson.Rob@vectorscm.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Tuesday, January 07, 2003 6:00 PM
Subject: RE: Writing a DB2 Java Stored Procedure compiling task


> Hien, I deploy stored procedures to Oracle, but not with ant. There is no
> ant task that I know of for deploying packages and procedures, but it
would
> be great if there was.
>
> -Rob Anderson
>
> -----Original Message-----
> From: Hien Q. Nguyen [mailto:hienqnguyen@yahoo.com]
> Sent: Tuesday, January 07, 2003 6:44 AM
> To: Ant Users List
> Subject: RE: Writing a DB2 Java Stored Procedure compiling task
>
>
>
> Hi Kola,
> I'm aware of the sql task but what I meant was a task to compile a SQLJ
JAVA
> STORED PROCEDURE
> Here is an example Java stored proc:
> package javastoredproc;
> #sql iterator MyIter ( int, int );
> public class MyJavaStoredProc
> {
>      public static void myJavaStoredProc( ResultSet rs[] ) throws
> SQLException, Exception
>      {
>          MyIter myIter=null;
>          #sql myIter=
>          {
>                select columnA, columnB from some_table
>          };
>          file://...bla..bla..bla...
>     }
> }
> In DB2, the compilation steps are:
> 1.  First the source is process by sqlj (a db2 utility) to generate the
> appropriate code
> 2.  javac on genrated code
> 3.  db2profc (a db2 utility for profiling the sqlj stored proc.)
> 4.  now the create stored proc statement, i.e.
> CREATE PROCEDURE HIEN.MYJAVASTOREDPROC   ( )
> EXTERNAL NAME
> '"HIEN".MYJAVASTOREDPROC:javastoredproc.MyJavaStoredProc.myJavaStoredProc
> SPECIFIC HIEN.MYJAVASTOREDPROC
> RESULT SETS 0
> LANGUAGE JAVA
> PARAMETER STYLE JAVA
> NOT DETERMINISTIC
> FENCED NO
> DBINFO NULL
> CALL MODIFIES SQL DATA
> ;
> Does anybody use sqlj stored. procedure?  Its available in Oracle, DB2, &
> Sybase(?)
> Thanks,
> --Hien
>  "Fajimolu, Kola" <kola_fajimolu@standardandpoors.com> wrote:Hi
>
> Happy New Year to All
> This book has a section on creating a database using ant.
> It uses the Ant sql task to create a DB and insert data.
> Through the examples given I think you will be able to create your stored
> procedures.
> You could download the source code for the book for example of ???
>
>
http://www.amazon.com/exec/obidos/tg/detail/-/047120708X/104-2318894-5881526
> ?vi=glance
>
>
> KolaF
>
> > -----Original Message-----
> > From: "Antoine Levy-Lambert"
> > @MCGRAW-HILL
> > Sent: Tuesday, January 07, 2003 8:11 AM
> > To: Ant Users List
> > Subject: Re: Writing a DB2 Java Stored Procedure compiling task
> >
> >
> > There is a SQL task in ant, which requires a JDBC driver. If you are
using
> > a
> > JDBC driver for DB2, and
> > the JDBC driver supports the creation of stored procedures, you can
create
> > your stored procs with ant.
> > Antoine
> > ----- Original Message -----
> > From: "Hien Q. Nguyen"
> > To:
> > Sent: Tuesday, January 07, 2003 5:58 AM
> > Subject: Writing a DB2 Java Stored Procedure compiling task
> >
> >
> > > Hi,
> > >
> > > I want to use Ant to build our back end DB2 Java
> > > Stored Procedures and I've searched the list and
> > > looked around the website but couldn't find anything.
> > > I'm wondering if anybody has done/wanted such a task.
> > > If not I'd like to write one and share with the
> > > community. Any comments, suggestions are greatly
> > > appreciated.
> > >
> > > Thanks,
> > > --Hien
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > > http://mailplus.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> > ATTACHMENT part 2 application/ms-tnef --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
> . .   .    .       .           .
> hienqnguyen@yahoo.com
>
> "Give me a lever and a fulcrum, and I can move the globe." --Archimedes
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>


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

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


Mime
View raw message