Walker News

Uses SQL To Check DB2 Edition And Version Number

Both db2ls and db2licm can retrieve DB2 product related information, but these are not the only two choices. For those who are still using DB2 v8 or lower, db2ls is not available except the db2licm command. Anyway, IBM has officially ceased the support for DB2 v8 since 2Q 2009.

In DB2 v9, DBA or application developer can also run SQL to query DB2 product edition and version number you’re working on:

IBM DB2 v8 end of support date.

1) Connect to any one of the databases. Suppose there is a sample database created during DB2 installation, run this following DB2 command to connect to this sample database at Linux command prompt:
db2 connect to sample

2) Next, execute this SQL to query ENV_PROD_INFO administrative view for DB2 product edition, version number, and license information:
SELECT * FROM SYSIBMADM.ENV_PROD_INFO

The table structure of ENV_PROD_INFO administrative view:
dbadm1 $ db2 describe table SYSIBMADM.ENV_PROD_INFO

Column          Type    Type
name            schema  name      Length  Scale Nulls
--------------- ------- --------- ------- ----- ------
INSTALLED_PROD  SYSIBM  VARCHAR        26     0 Yes
IS_LICENSED     SYSIBM  SMALLINT        2     0 Yes
PROD_RELEASE    SYSIBM  VARCHAR        26     0 Yes

where the value of INSTALLED_PROD can be these:
  • RTCL: DB2Run-Time Client
  • CLIENT: DB2 Client
  • CONSV: DB2 Connect Server
  • CONPE: DB2 Connect Personal Edition
  • ESE: DB2 Enterprise Server Edition
  • EXP: DB2 Express Edition
  • PE: DB2 Personal Edition
  • WSE: DB2 Workgroup Server Edition

With reference to ENV_SYS_INFO – system information.

Custom Search

2014  •  Privacy Policy