ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.yu>
Subject Re: sql ant task
Date Mon, 27 Aug 2007 14:50:03 GMT
Hi Temp, :)

> I trying to execute small script using ant  , here is the script
...
>   select 'drop table ', table_name, 'cascade constraints \;' from user_tables

Save your script to sql/SCRIPT.sql, and try something like this:


<property name="db.driver"    value="com.mysql.jdbc.Driver"/>
<property name="db.url"
           value="jdbc:mysql://www.mycompany.org/myschema"/>
<property name="db.username"  value="myuser"/>
<property name="db.password"  value="mypass"/>
<property name="db.classpath"
           value="../lib/mysql-connector-java-5.0.4-bin.jar"/>

<target name="sql">
     <sql driver="${db.driver}"
          url="${db.url}"
          userid="${db.username}"
          password="${db.password}"
          src="sql/SCRIPT.sql"
          encoding="UTF-8"
          classpath="${db.classpath}"
     />
</target>

	

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


Mime
View raw message