Informix Error -9721: Module name could not be unloaded while in use.
Cause and resolution
Module name could not be unloaded while in use.
You can use the ifx_unload_module() function only to unload an unused shared-object file; that is, when no executing SQL statements (in any database) are using any user-defined routines in the specified shared-object file.
Wait until all active SQL statements complete before trying to unload the shared-object file.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9721 fires when ifx_unload_module() targets a shared-object file that's still in use —
per the official guidance.
- Executing SQL statements (in any database) still using a UDR in the specified
shared-object file, per the official guidance — the direct, only cause;
ifx_unload_module()can only unload an unused shared-object file.
Solutions / Resolution
- Wait until all active SQL statements using the module complete before unloading it, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond attempting to unload an in-use module.
Diagnostic Checks
- Check for active SQL statements using UDRs from the shared-object file
(
onstat -g ses/onstat -g act), and wait for them to complete before retrying.
Related Errors / Related Topics
- -9720 — "Module name or language name specified is not valid." A related module- management error, on the name/language being invalid rather than the module being in use.
The shared-object file was still in use, so it couldn't be unloaded — wait for active SQL statements to complete.