DB2 get version Methods

来源:互联网 发布:云端网络成功案例 编辑:程序博客网 时间:2024/05/23 00:14

Method 1. Connect to the database from the command line and read the herald message:

$ db2 connect to mydb   Database Connection Information Database server        = DB2/LINUXX8664 9.7.1 SQL authorization ID   = DB2INST5 Local database alias   = AOL_MM

Method 2. Retrieve the version from the system table:

$ db2 "select * from SYSIBM.SYSVERSIONS"VERSIONNUMBER VERSION_TIMESTAMP          AUTHID   VERSIONBUILDLEVEL             ------------- -------------------------- -------- -----------------9070100       2011-10-10-14.38.42.064608 DB2INST5 s091114                         1 record(s) selected.


Method 3. Get the version directly using the 'db2level' command:

$ db2levelDB21085I  Instance "db2inst5" uses "64" bits and DB2 code release "SQL09071" with level identifier "08020107".Informational tokens are "DB2 v9.7.0.1", "s091114", "IP23034", and Fix Pack "1".Product is installed at "/opt/ibm/db2/V9.7".

 

Method 4. The Database Manager snapshot, among other interesting information, also contains the version:

$ db2 get snapshot for dbm | grep -P "(Product name|Service level)"Product name                                   = DB2 v9.7.0.1Service level                                  = s091114 (IP23034)
$ db2 connect to mydb Database Connection Information Database server        = DB2/LINUXX8664 9.7.1 SQL authorization ID   = DB2INST5 Local database alias   = AOL_MM

0 0
原创粉丝点击