IBM Support

32-bit routine in 64-bit OS returns SQL0444N if some conditions aren't met.

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]

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Routines (SP \u0026 UDF) - SQL","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;9.5;9.7;9.8","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
01 May 2025

UID

swg21653665