IBM/db2forzosdeveloperextension-about

Unable to connect to DB2.

Closed this issue · 6 comments

I get the error: Failed to connect to DEV: Unable to set DB2 version information: DB2 SQL Error: SQLCODE=-440, SQLSTATE=42884, SQLERRMC=GETVARIABLE;FUNCTION, DRIVER=4.29.24 when I finish setting up a connection and click on finish.

image

Is it possible to pass the connection string manually within the settings?

Hi Farrenzo, thank you for reporting this issue. It seems that your database doesn't have GETVARIABLE function set up. Could you check it? You can run this query to see if the function is available.
SELECT GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1

Meanwhile, we'll open an internal issue to see if we can handle the case in a better way.

You are correct, it is indeed not set up. I get the same error when I query for the GETVARIABLE.

@Farrenzo Could you try to add explicit schema to GETVARIABLE when running this query? Thanks.
SELECT SYSIBM.GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1

Unfortunately, I am no longer in a position to troubleshoot this issue.

I'm getting the same issue and can help debug this. I have ran SELECT SYSIBM.GETVARIABLE('SYSIBM.VERSION') FROM SYSIBM.SYSDUMMY1 and on specific schemas, but I get:

SQLERROR[42884]: No authorised routine named 'GETVARIABLE' of type 'FUNCTION' having compatible arguments found. SQLCODE=-440, SQLSTATE=42884, DRIVER=4.26.14

I can retrieve the DB2 version however by doing:

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