DB2 - Problem description
Problem IC87900 | Status: Closed |
2-PART NAME REFERENCES TO A FUNCTION MAY FAIL TO RE-RESOLVE AFTER A SCHEMA CHANGE | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
Within the same connection, if there are multiple identical statements that reference a function in the form (<module-name>.<function-name>) under different implicit schema, DB2 may fail to re-resolve the schema name despite a schema change. They will happen when SYSIBM is the first entry in both the function path of the cached statement and the current function path. Example 1: Assuming the existence of a function M.Func1() (where M is the name of a module or PL/SQL package) in both schema A and schema B. set current path = sysibm, A, sysproc, sysfun; select M.Func1() from sysibm.dual; set current path = sysibm, B, sysproc, sysfun; -- A.M.Func1, instead of B.M.Func1, may be incorrectly invoked. select M.Func1() from sysibm.dual; Example 2: Implications where multiple connections under different authids are involved. Default function path has 'SYSIBM' as the first entry. --@USERA db2 connect to testdb db2 create or replace module test db2 "alter module test publish function test () returns char(10) begin return 'USERA'; end" db2 "select test.test() from sysibm.dual" 1 ---------- USERA db2 terminate @USERB db2 connect to testdb db2 create or replace module test db2 "alter module test publish function test () returns char(10) begin return 'USERB'; end" db2 "select test.test() from sysibm.dual" 1 ---------- USERB db2 terminate @USERA db2 connect to testdb db2 "select test.test() from sysibm.dual" 1 ---------- USERB <=== INCORRECT | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 10.1 FixPack 2 * **************************************************************** | |
Local Fix: | |
Add a "flush package cache dynamic" statement after changing current schema. | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 10.1 FixPack 2 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 04.11.2012 08.01.2013 08.01.2013 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.2 | |
10.5.0.2 |