I guess I can give You a postgreSQL example, if that suits You. Under
unix/linux pgsql comes with a command line tool which you can easily
use. Here's the sample part of antfile - not tested, so no guarantees,
but I suppose it could look more or less like this:
<exec dir="." executable="pgsql">
<arg line="-i ./mystuff/mysqlscript.sql"/>
</exec>
Dig the ant docs a little to find out more. If I remember pgsql well,
this should probably work fine, if you'd have it accessible on the
system path.
Best regards,
Krzysztof
miro wrote:
Thank you very much for your reply can you send me a simple example of using
exec task to execute a sql file ?
Thanks
Miro
Krzysztof Kucybała wrote:
I suppose the easies, though maybe not the smartest way to do it, would
be to use exec task. Of course that is only useful if you have a command
line interface for the db that You're trying to use. You could put this
in some *.sql file and have it exec-uted from ant. Does that help?
Best regards,
Krzysztof
temp temp wrote:
I trying to execute small script using ant , here is the script
SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF
SET ESCAPE \
SPOOL DELETEME.SQL
select 'drop table ', table_name, 'cascade constraints \;' from
user_tables
how to run this script using ant sql task
Thanks
Miro
---------------------------------
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user
panel and lay it on us.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]