The derby database installations of our customers have different versions of the schemes. For instance. Client1 has a db-scheme version 4.1.5.0240, Customer2 has a version 4.0.1.0330.
The idea is to upgrade your abstract outline to the actual version when installing new software. There are several sql scripts to upgrade to the next level. For instance. update_4.1.5.0240_to_4.3.1.0020.sql.
The tool / procedure I'm looking for should read the actual installed version from the derby database table. According to this version, the corresponding sql script must be run in order to update the scheme to the next level. This procedure should be repeated until a suitable sql script is found for the real version to read.
Installation on a client site should be done without a head without the help of an administrator.
1.) I would prefer a java program that reads a version using JDBC. But how to run sql scripts from java? Should I call the ij command line tool from java?
2.) Are there any better alternatives?
Thanks Victor
source
share