Troubleshooting
Problem
Support of 32-bit routines under 64-bit OS requires special clause to be set.
Symptom
The error message presented to a user:
>db2 "values schema.userRoutine('someINparameter')"
1
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
--------------------------------------
SQL0444N Routine "*userRoutine" (specific name "schema.userRoutine") is
implemented with code in library or path ".../db2fence/udf/userRoutine",
function "definedFunction" which cannot be accessed. Reason code: "5".
SQLSTATE=42724
The error message present in db2diag.log:
2013-10-22-14.22.45.678266+120 E3163A807 LEVEL: Error (OS)
PID : 15369520 TID : 772 PROC : db2fmp (C) 0
INSTANCE: db2inst1 NODE : 000
APPID : *N0.db2inst1.140716150307
EDUID : 772 EDUNAME: db2fmp (C) 0
FUNCTION: DB2 UDB, oper system services, sqloAIXLoadModuleTryShr,
probe:130
CALLED : OS, -, dlopen
OSERR : ENOEXEC (8) "Cannot run a file that does not have a valid
format."
MESSAGE : Attempt to load specified library failed.
DATA #1 : Library name or path, 32 bytes
/home/db2inst1/db2fence/udf/userRoutine
DATA #2 : shared library load flags, PD_TYPE_LOAD_FLAGS, 4 bytes
2
DATA #3 : String, 139 bytes
0509-022 Cannot load module /home/db2inst1/db2fence/udf/userRoutine.
0509-026 System error: Cannot run a file that does not have a valid
format.
2013-07-22-14.22.45.720525+120 E3971A971 LEVEL: Error (OS)
PID : 15369520 TID : 772 PROC : db2fmp (C) 0
INSTANCE: db2inst1 NODE : 000
APPID : *N0.db2inst1.140716150307
EDUID : 772 EDUNAME: db2fmp (C) 0
FUNCTION: DB2 UDB, oper system services, sqloAIXLoadModuleTryShr,
probe:140
CALLED : OS, -, dlopen
OSERR : ENOENT (2) "A file or directory in the path name does not
exist."
MESSAGE : Attempt to load specified library augmented with object name
failed.
DATA #1 : Library name or path, 42 bytes
/home/db2inst1/db2fence/udf/userRoutine(shr_64.o)
DATA #2 : shared library load flags, PD_TYPE_LOAD_FLAGS, 4 bytes
262146
DATA #3 : String, 262 bytes
0509-022 Cannot load module /home/db2inst1/db2fence/udf/userRoutine(shr_64.o).
0509-153 File /home/db2inst1/db2fence/udf/userRoutine is not an archive or
the file could not be read properly.
0509-026 System error: Cannot run a file that does not have a valid
format.
A snippet of DB2 traces, when issue occurs:
58905 | | | | sqloAIXLoadModuleTryShr SYSTEM ERROR [probe 140]
58906 | | | | | | | sqloclose entry
58907 | | | | | | | sqloclose exit
58908 | | | | | | | sqloSigMask entry
58909 | | | | | | | sqloSigMask exit
58910 | | | | | | | sqloSigMask entry
58911 | | | | | | | sqloSigMask exit
58912 | | | | | | pdLogInternal exit
58913 | | | | | pdLogSysRC exit
58914 | | | | sqloAIXLoadModuleTryShr exit
58915 | | | sqloLoadModule SYSTEM ERROR [probe 140]
58916 | | | sqloLoadModule exit [rc = 0x870F009B = -2029059941 =
SQLO_MOD_LOAD_FAILED]
58917 | | | sqlerLibraryMapSqloToUdfError entry
58918 | | | sqlerLibraryMapSqloToUdfError exit [rc = 5]
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
01 May 2025
UID
swg21653665