SQL*Plus Ant Task

Incanto is good open source tool to invoke SQL*Plus from within Ant scripts.

Use Incanto

* Download Incanto from its download link. I downloaded incanto-0.2.4.zip.
* Unzip into an empty directory.
* Include incanto jar file in classpath

set CLASSPATH=c:\incanto-0.2.4\incanto-0.2.4.jar;%CLASSPATH%

* Use in ant scripts. See http://incanto.sourceforge.net/usage.html for details.
– Add xmlns:ora=”antlib:net.sf.incanto” as project attribute.
– Use ora:sqlplus Ant task.

<project name="Test.Incanto" basedir="." default="test.db"
         xmlns:ora="antlib:net.sf.incanto">
  <target name="test.db">
    <ora:sqlplus logon="scott/tiger@orcl" start="./test.sql"/>
  </target>
</project>

References

* http://incanto.sourceforge.net/usage.html

This entry was posted in oracle. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.