DB2 10.5 for Linux, UNIX, and Windows

DB2Version class

The com.ibm.db2.jcc.DB2Version class provides methods that return information about theIBM® Data Server Driver for JDBC and SQLJ version.

DB2Version methods

The following methods are defined only for the IBM Data Server Driver for JDBC and SQLJ.
getBuildNumber
Format:
public static String getBuildNumber()

Returns the last portion of the driver version. For driver version xx.yy.zzz, the build number is zzz.

getCompatibleJREVersions
Format:
public static String[] getCompatibleJREVersions()

Returns the Java Runtime Environment versions that are compatible with the driver version.

getDriverName
Format:
public static String getDriverName()

Returns the name of the driver.

getDB2ConnectLicenseVersion
Format:
public static String getDB2ConnectLicenseVersion()

Returns the DB2 Connect version for which the IBM Data Server Driver for JDBC and SQLJ client license is valid.

This method is supported only for connections to DB2® for z/OS® or DB2 for i data servers.

getExpirationDateForDriver
Format:
public static java.util.Date getExpirationDateForDriver()

Returns the date on which the client license file for connections to DB2 for z/OS or DB2 for i data servers expires.

This method is supported only for connections to DB2 for z/OS or DB2 for i data servers.

getExpirationDateForDriverWithLicenseType
Format:
public static String getExpirationDateForDriverWithLicenseType()
Returns a String value that contains:
  • The date on which the client license file for connections to DB2 for z/OS or DB2 for i data servers expires.
  • The type of license: temporary or permanent

This method is supported only for connections to DB2 for z/OS or DB2 for i data servers.

getMajorVersion
Format:
public static String getMajorVersion()

Returns the first portion of the driver version. For driver version xx.yy.zzz, the major version is xx.

getMinorVersion
Format:
public static String getMinorVersion()

Returns the middle portion of the driver version. For driver version xx.yy.zzz, the minor version is yy.

getVersion
Format:
public static String getVersion()

Returns the driver version.