Need to SQL Query the DB2 version on the IBM i series thebrenda

​[[{“value”:”I am on MS SQL server and can only run SQL commands when connected to the IBM i series via an openquery linked server connection. Querying QSYS2.SOFTWARE_PRODUCT_INFO returns IBM i series RELEASE_LEVEL = ‘V7R5M0’. But I need the DB2 version, like v11.5.4.0. How can i get the DB2 version via a SQL command?
Tried the following and got errors
— Error – SQL0204: GETVARIABLE in *LIBL type *N not found
select * from openquery(linkserver_db2_horizon5, ‘SELECT GETVARIABLE(”SYSIBM.VERSION”) FROM SYSIBM.SYSDUMMY1’)
— Error – ENV_INST_INFO in SYSIBMADM type *FILE not found.
select * from openquery(linkserver_db2_horizon5, ‘SELECT * FROM SYSIBMADM.ENV_INST_INFO’)
submitted by /u/thebrenda[link][comments]”}]] Read More 

Leave a Reply

Verified by MonsterInsights