How to check db2 version

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

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

Thanks, Melita

相关标签:
15条回答
  • 2020-12-04 17:56

    For DB2:

    "SELECT * FROM SYSIBMADM.ENV_INST_INFO" - SERVICE_LEVEL
    
    0 讨论(0)
  • 2020-12-04 17:58

    In z/OS while on version 10, use of CURRENT APPLICATION COMPATIBILITY is not allowed. You will have to resort to:

    SELECT GETVARIABLE('SYSIBM.VERSION') AS VERSION,
           GETVARIABLE('SYSIBM.NEWFUN')  AS COMPATIBILITY
    FROM SYSIBM.SYSDUMMY1;
    

    Here is a link to all the variables available: https://www.ibm.com/support/knowledgecenter/SSEPEK_12.0.0/sqlref/src/tpc/db2z_refs2builtinsessionvars.html#db2z_refs2builtinsessionvars

    0 讨论(0)
  • 2020-12-04 17:59

    Another one in v11:

    select CURRENT APPLICATION COMPATIBILITY from sysibm.sysdummy1
    

    Result:

    V11R1
    

    It's not the current version, but the current configured level for the application.

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

    There is also the env_inst_info admin view. As with CanSpice I can only vouch for LUW, but there should at least be a similar view available for Z/OS.

    SELECT * FROM SYSIBMADM.ENV_INST_INFO
    
    0 讨论(0)
  • 2020-12-04 18:02

    Both worked for me.

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

    or

    SELECT * FROM SYSIBMADM.ENV_INST_INFO;
    
    0 讨论(0)
  • 2020-12-04 18:02
    SELECT GETVARIABLE(('SYSIBM.VERSION')
     FROM SYSIBM.SYSDUMMY1;
    -- PPP IS PRODUCT STRING 'DSN'
    -- VV IS VERSION NUMBER E.G., 10, 11
    -- M IS MAINTENANCE LEVEL E.G. 5
    
    -DISPLAY GROUP
     THIS WILL DISPLAY THE LEVEL CM, ENFM, N
    
    0 讨论(0)
提交回复
热议问题