How to check db2 version on Z/OS using only SQL commands?
Thanks, Melita
IBM Db2 Community Edition is a free to download, use and redistribute edition of the IBM Db2 data server, which has both XML database and relational database management system features. It is limited to four CPU cores, 16 GB of RAM and no Enterprise support and fix packs.
There is a DISPLAY GROUP command for DB2 on z/OS®. The data returned from this command includes the version number. For example, if your DB2 command prefix is -D91C, then input /-D91C DISPLAY GROUP from SD.
To check the status of the target DB2. From EZDB2, hyperlink on DB2 Status Summary. This link takes you to the STDB2 view (Checking the status of all DB2 subsystems), but only one DB2 is displayed. To review recent history, on the COMMAND line type TIME * * 2H to see the last 2 hours by 15-minute intervals.
Type TSO DB2I and then select DB2 COMMANDS and use -DISPLAY GROUP to get the Version.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With