How to check db2 version

后端 未结 15 1440
说谎
说谎 2020-12-04 17:54

How to check db2 version on Z/OS using only SQL commands?

Thanks, Melita

相关标签:
15条回答
  • 2020-12-04 18:07

    To find out the fixpak information using command prompt: db2level

    To find out the version and license information using command prompt: db2licm -l

    C:\Users\Administrator>db2level
    DB21085I  This instance or install (instance name, where applicable: "DB2")
    uses "64" bits and DB2 code release "SQL10051" with level identifier
    "0602010E".
    Informational tokens are "DB2 v10.5.100.63", "s130816", "IP23521", and Fix Pack
    
    "1".
    Product is installed at "C:\SQLLIB" with DB2 Copy Name "DB2COPY1".
    
    
    C:\Users\Administrator>db2licm -l
    Product name:                     "IBM Data Server Client"
    Product identifier:               "db2client"
    Version information:              "10.5"
    
    0 讨论(0)
  • 2020-12-04 18:10

    In AIX you can try:

    db2level
    

    Example output:

    db2level
    DB21085I  This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL09077" with level
    identifier "08080107".
    Informational tokens are "DB2 v9.7.0.7", "s121002", "IP23367", and Fix Pack
    "7".
    Product is installed at "/db2_09_07".
    
    0 讨论(0)
  • 2020-12-04 18:12

    You can try the following query:

    SELECT service_level, fixpack_num FROM TABLE
      (sysproc.env_get_inst_info())
      as INSTANCEINFO
    

    It works on LUW, so I can't guarantee that it'll work on z/OS, but it's worth a shot.

    0 讨论(0)
  • 2020-12-04 18:14

    I used

    SELECT * FROM TABLE(SYSPROC.ENV_GET_INST_INFO()); 
    

    from tyranitar and that worked on Z/OS. Here's what I got:

    SERVICE_LEVEL
    DB2 v9.7.0.6
    

    I'd vote up if I could! Thanks!!

    0 讨论(0)
  • 2020-12-04 18:16
    SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1
    
    0 讨论(0)
  • 2020-12-04 18:16

    Try the first or the second:

    SELECT * FROM TABLE(SYSPROC.ENV_GET_INST_INFO());
    SELECT * FROM TABLE(SYSPROC.ENV_GET_PROD_INFO());
    SELECT * FROM TABLE(SYSPROC.ENV_GET_SYS_INFO());
    
    0 讨论(0)
提交回复
热议问题