In jdbc, how to verify that we are using an oracle 8i database?
Connection connection = DriverManager.getConnection(url); DatabaseMetaData meta = connection.getMetaData(); String product = meta.getDatabaseProductName(); String major = meta.getDatabaseMajorVersion(); String minor = meta.getDatabaseMinorVersion();
You may need to use the database metadata class .
Run:
select * from v$version
It should produce something like:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production ...
Then it's just a matter of parsing the first line of the result.