ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: AW: Problem with sql (with a distant oracle server)
Date Fri, 05 Jul 2002 08:25:07 GMT
OK, I think that´s it.

SQL-Files are executed on server. Ant reads the first SQL-file, "transfers"
the statement via JDBC to the oracle host and Oracle performs the
statements. If there is a kind of include Oracle tries to load the other
files - and they are on the client.

Could you do the "include" in Ant via fileset?

<sql>
    <fileset>
        <include name="**/*.sql" />
    </fileset>
</sql>

(see SQL-Task and fileset as parameter)


mit freundlichen Grüßen
Jan Matèrne 

RZF NRW 
Sachgebiet 314-P Methodenberatung 
Internet:	jan.materne@rzf.fin-nrw.de 


> -----Ursprüngliche Nachricht-----
> Von:	Cyriaque Dupoirieux [SMTP:cyriaque.dupoirieux@pcotech.fr]
> Gesendet am:	Freitag, 5. Juli 2002 10:17
> An:	Ant Users List
> Betreff:	Re: AW: AW: Problem with sql (with a distant oracle server)
> 
> OK, It works for me to but I'm tring to execute a local sql file that 
> calls others local sql files and I have the following error ;
> 
> test:
>      [echo] ${rep.db}.
>      [echo] D:\ptc\Windchill/db.
>      [echo] driver   = [oracle.jdbc.driver.OracleDriver]
>      [echo] url      = [jdbc:oracle:thin:@thalassa:1521:tlse3]
>      [echo] userid   = [wt51duc1]
>      [echo] password = [wt51duc1]
>       [sql] Executing file: D:\ptc\Windchill\db\sql\ext\gesyma\Reinit.sql
>       [sql] Failed to execute: @ext/gesyma/Make_gesyma.sql 
> @ext/gesyma/Make_gesyma_DBView.sql @wt/part/Make_part.sql 
> @wt/part/Make_part_DBVi
> ew.sql @wt/workflow/work/Make_work.sql 
> @wt/workflow/work/Make_work_DBView.sql 
> @wt/workflow/engine/Drop_WfProcess.sql @wt/workflow/engine/Cre
> ate_WfProcess.sql @wt/workflow/engine/Create_WfProcessPK.sql 
> @wt/doc/Make_doc.sql @wt/doc/Make_doc_DBView.sql 
> @wt/folder/create_IteratedShor
> tcutLink.sql @wt/folder/create_IteratedShortcutLinkPK.sql
> 
> BUILD FAILED
> 
> O:\ant4wt\surLeFeu\build.xml:583: java.sql.SQLException: ORA-00900: 
> invalid SQL statement
> 
> I think that it tries to find the other local files on the server and 
> not on my machine ...
> 
> Regards,
> 
> 
> Jan.Materne@rzf.fin-nrw.de wrote:
> 
> >The following works for me:
> >
> ><project name="test" default="main" basedir=".">
> >    <property name="jdbc.driver" value="oracle.jdbc.driver.OracleDriver"
> />
> >    <property name="db.host" value="z011019" />
> >    <property name="db.name" value="campus"  />
> >    <property name="db.user" value="mat"     />
> >    <property name="db.pwd"  value="matmat"  />
> >    <property name="db.url"
> >value="jdbc:oracle:thin:@${db.host}:1521:${db.name}" />
> >
> >    <target name="main">
> >        <sql driver="${jdbc.driver}" url="${db.url}" userid="${db.user}"
> >password="${db.pwd}">
> >            select * from nachrichten;
> >        </sql>
> >    </target>
> >
> ></project>
> >
> >
> >But I had to place the classes12.zip as Jar-file in the ant\lib-directory
> >(e.g. oracle817.jar), so Ant could instantiate the driver class.
> >
> >
> >mit freundlichen Grüßen
> >Jan Matèrne 
> >
> >RZF NRW 
> >Sachgebiet 314-P Methodenberatung 
> >Internet:	jan.materne@rzf.fin-nrw.de 
> >
> >
> >>-----Ursprüngliche Nachricht-----
> >>Von:	Cyriaque Dupoirieux [SMTP:cyriaque.dupoirieux@pcotech.fr]
> >>Gesendet am:	Freitag, 5. Juli 2002 09:43
> >>An:	Ant Users List
> >>Betreff:	Re: AW: Problem with sql (with a distant oracle server)
> >>
> >>
> >>Jan.Materne@rzf.fin-nrw.de wrote:
> >>
> >>>Try the SQL-Task:
> >>>
> >>I already use the sql task of ant...
> >>
> >>>
> >>>Executes a series of SQL statements via JDBC to a database. Statements
> >>>
> >>can
> >>
> >>>either be read in from a text file using the src attribute or from
> >>>
> >>between
> >>
> >>>the enclosing SQL tags.
> >>>
> >>>So SQL is on your client machine. 
> >>>Is this enough?
> >>>
> >>I don't know ?
> >>
> >>>
> >>>
> >>>mit freundlichen Grüßen
> >>>Jan Matèrne 
> >>>
> >>>RZF NRW 
> >>>Sachgebiet 314-P Methodenberatung 
> >>>Internet:	jan.materne@rzf.fin-nrw.de 
> >>>
> >>>
> >>>>-----Ursprüngliche Nachricht-----
> >>>>Von:	Cyriaque Dupoirieux [SMTP:cyriaque.dupoirieux@pcotech.fr]
> >>>>Gesendet am:	Freitag, 5. Juli 2002 09:31
> >>>>An:	Liste Ant
> >>>>Betreff:	Problem with sql (with a distant oracle server)
> >>>>
> >>>>Hello everybody,
> >>>>  
> >>>>       I have a problem to execute sql files with ant and I wonder if

> >>>>the sql files need to be on the server or if ant is able to
> >>>>   execute local sql files to a distant server (I installed an Oracle

> >>>>client on my machine...)
> >>>>
> >>>>   Can you help me ?
> >>>>
> >>>>   Regards,
> >>>>Cyriaque,
> >>>>
> >>>>-- 
> >>>>Cyriaque Dupoirieux <mailto:Cyriaque.Dupoirieux@pcotech.fr>
> >>>>PCO Technologies
> >>>>Burolines - 2 ter rue Marcel Doret
> >>>>31700 Blagnac
> >>>>Tél : 05.34.60.44.13 - Fax : 05.34.60.44.10
> >>>>
> >>-- 
> >>Cyriaque Dupoirieux <mailto:Cyriaque.Dupoirieux@pcotech.fr>
> >>PCO Technologies
> >>Burolines - 2 ter rue Marcel Doret
> >>31700 Blagnac
> >>Tél : 05.34.60.44.13 - Fax : 05.34.60.44.10
> >>
> >>
> >
> 
> -- 
> Cyriaque Dupoirieux <mailto:Cyriaque.Dupoirieux@pcotech.fr>
> PCO Technologies
> Burolines - 2 ter rue Marcel Doret
> 31700 Blagnac
> Tél : 05.34.60.44.13 - Fax : 05.34.60.44.10
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message