var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help - Need to get DB2 version info via SQL
I'm hoping someone can help me determine the DB2 version running on an MVS host. I have access to the DB2 panels and spufi but have not been able to determine anything more than it is version 7 or later (SYSIBM.SYSCOLDIST_HIST is present and populated).
I tried something I found on the db2luw site but no luck:
SELECT service_level, fixpack_num FROM TABLE
SQL0440N No function by the name "SYSPROC.ENV_GET_INST_INFO" having compatible arguments was found in the function path. SQLSTATE=42884
Thanks in advance,
Last edited by ChrisNees; 03-16-07 at
Try to issue a -DIS GROUP command.
you'll see something like this:
BEGIN DISPLAY OF GROUP(xxxxx ) GROUP LEVEL(810) MODE(N)
GROUP LEVEL is the DB2 - version
MODE is the modus: C=compatibility mode, N=new funcion mode, E=enabling new funcion mode
Thanks but I need SQL solution
Thanks but I don't have access to any DBA utilities. I'm barred by RACF from issuing even display commands. It looks like I'm limited to SQL.
Last edited by ChrisNees; 03-19-07 at
Then try to access table SYSIBM.SYSDUMMYE
( By default that table is created in V8 Compatibility mode ).
If it exists, you are in V8.
Next access SYSIBM.SYSTABLES
if NAME and CREATOR are both VARCHAR(128), then that DB2 is V8 NFM,
otherwise NAME is VARCHAR(18) and CREATOR is CHAR(8)
Try any SQL, that's valid in V8 NFM only.
SELECT IBMREQD, ( SELECT IBMREQD FROM SYSIBM.SYSDUMMY1 )
If you receive an syntax error, that DB2 is V7,
if you receive SQLCODE -4700, that DB2 is V8 CM,
if execution is successfull, that DB2 is V8 NFM.
( caution: that does not work, if you are INSTALL SYSADM. Those users do not get SQLCODE -4700, but may execute that statements in V8 CM )
Last edited by umayer; 03-20-07 at
I just ran
and it returned the correct information. I couldn't get your code to work (I only changed the
SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as x
INSTANCEINFO" to an x)
So if you can't run what I just ran then I think that suggests you are on v7 as that stored proc is new to 8.....
you ran that statement on DB2 for z/OS ?
I receive an error when I try to execute it.