DB2 - Problem description
Problem IT20198 | Status: Closed |
THE IMPLICIT CONNECT RESET WHEN IN A DB2DBDFT ENVIRONMENT | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - 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: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 11.1 Mod 2 Fix Pack 2 or higher * **************************************************************** | |
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. | |
available fix packs: | |
DB2 Version 11.1 Mod 2 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 11.1 Mod 2 Fix Pack 2 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 13.04.2017 27.06.2017 27.06.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |