Informix Error -24142: Permission denied: User cannot set mutability for environment variables.
Cause and resolution
Permission denied: User cannot set mutability for environment variables.
Only a user with DBA privileges can set the mutability property of a session environment variable. The statements that set mutability for environment variables are typically used by DBA in a sysdbopen() procedure to affect a user session.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-24142 fires when a non-DBA user tries to set a session environment variable's mutability
property — per the official guidance, only a DBA-privileged user can do this; it's
typically used in a sysdbopen() procedure to affect other users' sessions.
- A non-DBA-privileged user attempting to set an environment variable's mutability, per the official guidance — the direct, only cause.
Solutions / Resolution
- Have a DBA-privileged user (or the
sysdbopen()procedure) set the mutability instead, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a non-DBA user attempting this.
Diagnostic Checks
- Check the executing user's privilege level, and have a DBA-privileged user or the
sysdbopen()procedure perform the mutability change instead.
Related Errors / Related Topics
- -24143 — "Session environment variable
is immutable. Contact DBA." The resulting condition once a variable's mutability has been locked by a DBA.
A non-DBA user tried to set an environment variable's mutability — only a DBA-privileged
user or sysdbopen() can do that.