DB2 get version Methods

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:

$ db2level
DB21085I  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.1
Service 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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值