Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check Oracle JDBC Driver (classes12.zip) verion
lovingmononoke_at_gmail.com wrote:
> Thanks for the reply.
>
> But your code is to check the driver version on an oracle database
> server.
No it's not. That call is satisfied locally in the driver itself.
> I wanted to know the version of classez12.zip that my customers are
> using when they deploy my appserver. My application server loads
> classes12.zip in which my customers may get from somewhere. I wanted
> to know the JDBC version of classes12.zip that they are having.
Yep, understood. That code does it.
> In another words, WebLogic has ojdbc14.jar in its lib directory. Can I
> know the specific JDBC driver version of this ojdbc14.jar? The
> Manifest file only shows the supported oracle server version. I want
> to be able to get JDBC Driver Architecture version like that I can get
> from DB2JCC. Do you know how? Thanks!
>
> C:\>java -classpath C:\MyApp\common\lib\jdbc\db2jcc.jar
> com.ibm.db2.jcc.DB2Jcc -version
> IBM DB2 JDBC Universal Driver Architecture 2.8.46
The code will work for any JDBC driver, from anywhere. In fact if you connect from an external client to WebLogic and get a connection from any pool, and make those calls, you will get the version of the driver that WebLogic loaded for that pool.
Joe Weinstein at BEA Systems
> joeNOSPAM_at_BEA.com wrote:
> > Driver dr = new oracle.jdbc.OracleDriver();
> > Properties props = new Properties();
> > props.put("user", "joe");
> > props.put("password", "joe");
> >
> > Connection c = dr.connect("jdbc:oracle:thin:@joe:1521:JOEDB",
> > props);
> > System.out.println("The driver version is " +
> > c.getMetaData().getDriverVersion() );
> >
> > Joe Weinstein at BEA Systems
Received on Thu Jul 27 2006 - 14:32:11 CDT