My little open-source project - JDBC console
Posted Sun, 07/09/2008 - 09:17 by andrew
This is intended to be used from shell scripts or ant or maven builds to execute SQL scripts. Also it allows to enter SQL commands in interactive mode. In addition to the source code, there is a pre-built binary including all major open-source database drivers. To use Oracle/DB2/MSSQL JDBC drivers you need to download them from the corresponding corporate site.
Hope to hear your feedback.
Full story:

Comments
Hi Andrew
I think it may useful utility.
Some comments:
You may use apache commons-cli for command line parsing.
MSSQL (T-SQL) script line may end with GO rather with ";"
Thanks
Mark
looks nice,
what about a simple gui so that the jar could be executable?
Internally, in your project, commandline only may be good enough, but if you open it to opensource, I think it sould be more user friendly...
btw,
commons-cli has some issues, from my experience in Nexperience(pun unintended) -
in some situations it isn't thread safe, it does not allow expressing various constraints such as enumerated values, range constraints, etc., and it cannot deal unknown number of occurances of an option from the same kind (think java's -D)
there are other frameworks out there, for examle:
http://www.cs.ubc.ca/spider/lloyd/java/argparser.html
https://args4j.dev.java.net/
http://jargs.sourceforge.net/
http://jopt-simple.sourceforge.net/
http://naturalcli.sourceforge.net/
a sample .jdbcc configuration file?