DB2 - Problem description
Problem IT20895 | Status: Closed |
THE IMPLICIT CONNECT RESET WHEN IN A DB2DBDFT ENVIRONMENT | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
In a DB2DBDFT environment implicit CONNECT RESET unsets session variables. See the following example: db2set DB2DBDFT=repro db2 create db repro db2 connect to db repro db2 "create procedure test.proc(OUT a CHAR(32)) begin set a = application_id(); end" db2 terminate # repeat the following steps db2 "values(substr(application_id(),1,32))" db2 "call test.proc(?)" db2 "values(substr(application_id(),1,32))" db2 terminate While using here the CALL statement there is a a new connection and reset made to an already existing connection.What happens is the implicit CONNECT RESET when in a DB2DBDFT environment. In this demonstration the application ID changes as evidence of the CONNECT RESET. This reset has ramifications for SESSION variables - they change because the session has changed. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * DB2 LUW CLP * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to V10.5.9 or later * **************************************************************** | |
Local Fix: | |
There are a few ways to work this around. There can be issued some other statement that'll require the implicit connection prior to first access of the global variable, they'll avoid the issue. (e.g. create a dummy procedure that does nothing and call it first.) Other more typical solutions are: - Avoid using DB2DFTDB. Be explicit about the database you're using. - Use USER not CURRENT USER in the variable definition. | |
Solution | |
Fixed in db2_v105fp9 and later | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 06.06.2017 27.09.2017 27.09.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |