- How do I know what is installed in DB2?
- Is there a way, I can determine about hidden components installed in DB2?
- How do I know which language packs are installed in DB2?
Sometime, you might want to know answers about above questions. Normally, you will run db2level command to know about version of DB2 or FixPak level as shown below.
$ db2level DB21085I Instance "vikram" uses "64" bits and DB2 code release "SQL09010" with level identifier "02010107". Informational tokens are "DB2 v9.1.0.0", "special_17703", "LINUXAMD64_17703", and Fix Pack "0". Product is installed at "/opt/ibm/db2/V9.1".
You can also use this SQL to find Fix Pack number if you wanted to know same from an application.
$ db2 "select substr(service_level,1,20) service_level, fixpack_num from sysibmadm.env_inst_info" SERVICE_LEVEL FIXPACK_NUM -------------------- ----------- DB2 v9.1.0.0 0
If you want to find out all components installed, you can use db2ls command on Unix systems.
Normally, you use db2ls command to find out the location of db2 product on Unix systems. You can also run this command as a root as well as normal db2 user.
For example:
$ db2ls Install Path Level Fix Pack Special Install Number Install Date ------------------- ------- -------- ---------------------- ------------------------ /opt/ibm/db2/V9.1 9.1.0.0 0 1 Thu Jul 12 12:53:33 2007 EDT
Let us see how can we determine about installed components in DB2? Run db2ls command with switch -q to query and -b switch to specify base path. You can have several db2 products installed on your system and you should choose the path from a simple db2ls command as shown in the previous step.
$ db2ls -q -b /opt/ibm/db2/V9.1 Install Path: /opt/ibm/db2/V9.1 Feature Response File ID Level Fix Pack Feature Description -------------------------------------------------------------------------------------------- BASE_CLIENT 9.1.0.0 0 Base client support JDK 9.1.0.0 0 IBM Software Development Kit (SDK) for Java(TM) JAVA_SUPPORT 9.1.0.0 0 Java support SQL_PROCEDURES 9.1.0.0 0 SQL procedures BASE_DB2_ENGINE 9.1.0.0 0 Base server support CONNECT_SUPPORT 9.1.0.0 0 Connect support CONFIGURATION_ASSISTANT 9.1.0.0 0 Configuration Assistant SPATIAL_EXTENDER_CLIENT_SUPPORT 9.1.0.0 0 Spatial Extender client APPLICATION_DEVELOPMENT_TOOLS 9.1.0.0 0 Base application development tools COMMUNICATION_SUPPORT_TCPIP 9.1.0.0 0 Communication support - TCP/IP CONTROL_CENTER 9.1.0.0 0 Control Center REPL_CLIENT 9.1.0.0 0 Replication tools DB2_DATA_SOURCE_SUPPORT 9.1.0.0 0 DB2 data source support LDAP_EXPLOITATION 9.1.0.0 0 DB2 LDAP support INSTANCE_SETUP_SUPPORT 9.1.0.0 0 DB2 Instance Setup wizard XML_EXTENDER 9.1.0.0 0 XML Extender FIRST_STEPS 9.1.0.0 0 First Steps DB2_WEB_TOOLS 9.1.0.0 0 DB2 Web Tools XML_EXTENDER_SAMPLES 9.1.0.0 0 XML Extender samples DB2_SAMPLE_APPLICATIONS 9.1.0.0 0 ADT sample programs DB2_SAMPLE_DATABASE 9.1.0.0 0 Sample database source SPATIAL_EXTENDER_SAMPLES 9.1.0.0 0 Spatial Extender samples INFORMIX_DATA_SOURCE_SUPPORT 9.1.0.0 0 Informix data source support
You can use above db2ls -q -b /opt/ibm/db2/V9.1 with -a switch to also know about hidden or invisible components.
$ db2ls -q -b /opt/ibm/db2/V9.1 -a Install Path: /opt/ibm/db2/V9.1 Feature Response File ID Level Fix Pack Feature Description -------------------------------------------------------------------------------------------- DB2_PRODUCT_MESSAGES_EN 9.1.0.0 0 Product Messages - English BASE_CLIENT 9.1.0.0 0 Base client support JDK 9.1.0.0 0 IBM Software Development Kit (SDK) for Java(TM) DB2_JAVA_HELP_EN 9.1.0.0 0 Java Help (HTML) - English REPL_QSERVER 9.1.0.0 0 Replication with MQ Server BASE_DB2_SERVER 9.1.0.0 0 Run-time Environment JAVA_SUPPORT 9.1.0.0 0 Java support SQL_PROCEDURES 9.1.0.0 0 SQL procedures ICU_SUP 9.1.0.0 0 ICU Utilities REPL_SERVER 9.1.0.0 0 SQL Replication Support JAVA_COMMON_FILES 9.1.0.0 0 Java Common files BASE_DB2_ENGINE 9.1.0.0 0 Base server support DB2_CONTROL_CENTER_HELP_EN 9.1.0.0 0 Control Center Help (HTML) - English CONNECT_SUPPORT 9.1.0.0 0 Connect support CONFIGURATION_ASSISTANT 9.1.0.0 0 Configuration Assistant SPATIAL_EXTENDER_CLIENT_SUPPORT 9.1.0.0 0 Spatial Extender client APPLICATION_DEVELOPMENT_TOOLS 9.1.0.0 0 Base application development tools ADMINISTRATION_SERVER 9.1.0.0 0 Administration Server COMMUNICATION_SUPPORT_TCPIP 9.1.0.0 0 Communication support - TCP/IP CONTROL_CENTER 9.1.0.0 0 Control Center DATABASE_PARTITIONING_SUPPORT 9.1.0.0 0 Parallel Extension REPL_CLIENT 9.1.0.0 0 Replication tools RELATIONAL_WRAPPERS_COMMON 9.1.0.0 0 Relational wrappers common DB2_DATA_SOURCE_SUPPORT 9.1.0.0 0 DB2 data source support LDAP_EXPLOITATION 9.1.0.0 0 DB2 LDAP support INSTANCE_SETUP_SUPPORT 9.1.0.0 0 DB2 Instance Setup wizard XML_EXTENDER 9.1.0.0 0 XML Extender FIRST_STEPS 9.1.0.0 0 First Steps DB2_WEB_TOOLS 9.1.0.0 0 DB2 Web Tools ESE_PRODUCT_SIGNATURE 9.1.0.0 0 Product Signature for DB2 Enterprise Server Edition XML_EXTENDER_SAMPLES 9.1.0.0 0 XML Extender samples DB2_SAMPLE_APPLICATIONS 9.1.0.0 0 ADT sample programs DB2_SAMPLE_DATABASE 9.1.0.0 0 Sample database source SPATIAL_EXTENDER_SAMPLES 9.1.0.0 0 Spatial Extender samples INFORMIX_DATA_SOURCE_SUPPORT 9.1.0.0 0 Informix data source support
From above list, you can determine the national language pack installed on your machine if you look at the Product Messages feature. Or, just use this simple command.
$ db2ls -q -b /opt/ibm/db2/V9.1 -a | grep -i message DB2_PRODUCT_MESSAGES_EN 9.1.0.0 0 Product Messages - English
By looking above, you can determine that you have EN national language pack installed for db2.