Re: approach to upgrading



Hi!

Thus spake Jeff Kish on 05/11/2007 08:58 PM:
Any pointers, or approach suggestions are appreciated.

The other guys around might correct me, but from my personal
experience is that things like this are seldom worth the effort to
do them generically... Too much knowledge about the actual database
structure and the intended upgrades have to be hard-coded into the
application.

If you want to do it in Java, just grab your db connection with the
familiar Class.forName() scheme and start issuing those statements.
You can get the metadata from the Connection object via getMetaData().

One caveat is that you will obviously need a JDBC driver that
supports the metadata you require, not all drivers do. And you
should be aware that most DBMS don't support transactions on DDL
statements like ALTER TABLE and the like, so you should be certain
you know what you are doing before running the beast.

Regards,

Phil
.