DB2 - Problem description
Problem IT19442 | Status: Closed |
A DB2 FENCED ROUTINE MAY FAIL WITH ERROR SQL1646N DUE TO SHARED MEMORY PERMISSION PROBLEMS | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - DB2 | |
Problem description: | |
A routine ( procedure or function ) can fail with error SQL1646N because the fenced user ID does not have permissions to attach to the shared memory used for db2fmp <-> db2sysc communication. The error will not necessarily reflect this problem as the error can have different causes. The db2diag.log will report this message : EDUID : 117 EDUNAME: db2agent (SAMPLE) 0 FUNCTION: DB2 UDB, routine_infrastructure, sqlerInvokeFencedRoutine, probe:1220 MESSAGE : ZRC=0xFFFFF992=-1646 SQL1646N A routine failed because the fenced user ID cannot access required files in the sqllib directory or other instance or database directories. The problem is that the main DB2 process will have allocated a shared memory segment for db2fmp communication but due to operating system settings, this segment might be split across multiple segments. The db2diag.log also reports this : FUNCTION: DB2 UDB, SQO Memory Management, sqloGetSharedMemoryFromOs, probe:2026 DATA #1 : <preformatted> Unable to allocate 56832 MB in a single segment, 14 segments were required. Possible causes may include an improper setting for the shmmax Linux kernel tuneable, or a system-wide limit on the segment size. After allocation of this memory, the correct permissions should be set so that the fenced user id can access these, however this is incorrectly only done for the first segment that was allocated. The apar fix will ensure that all segments have the right permissions. Note that this problem is likely to surface since V11.1 M1 FP1 due to a changed memory allocation strategy for the FMP memory segment. This change may have too much impact and expose problems like the problem documented in this apar. Hence, the change will be altered by apar IT19471. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of DB2 version 11.1 * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to V11.1 M1 FP2 or higher. * **************************************************************** | |
Local Fix: | |
Set the FMP memory segment size to the original 256MB amount db2set DB2NTMEMSIZE=APLD:268435456 This requires recycling the instance (db2stop force; db2start) While the documentation indicates that DB2NTMEMSIZE is valid only for the Windows platform, it is also effective for UNIX platforms on the DB2 level vulnerable to APAR IT19471 (DB2 v11.1 mod 1 fix pack 1). Its use is not generally supported on UNIX platforms, and the setting should be removed upon upgrading to a level containing APAR fix for apar IT19471. | |
available fix packs: | |
DB2 Version 11.1 Mod 2 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
Update to V11.1 M1 FP2 or higher. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 27.02.2017 23.06.2017 23.06.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |