Troubleshooting

Troubleshooting issues creating UDX's in Python.

About this task

A general error can be returned by the UDX framework if a UDX cannot be run at all or if it completes with an error:

SQL1646N A routine failed because the fenced user ID cannot access required files in the sqllib directory or other instance or database directories.

CAUSE
  • DBM config setting PYTHON_PATH is not set
  • Environment variable $DB2_HOME is not set (for fenced user id)
  • Coding error in the UDX
DEBUGGING and RESOLVING
  • Check if a simple sample UDX works
  • Export DB2_PYUDF_DEBUG=5 for fenced user (might require Db2 restart) Output will be written to $DB2_HOME/db2dump/pythonUDX/
  • Use self.log() in python UDX to log information

Alternatively, modify the $DB2_HOME/adm/runpy.sh file to set the debug level (only if above instructions do not work or if a DB2 restart cannot be done)