Informix Error -668: The system command cannot be executed or it exited with a non-zero status.
Cause and resolution
The system command cannot be executed or it exited with a non-zero status.
Either a system call failed in the operating system or the command that was executed exited with a non-zero status.
The following example shows a statement that might cause the system command to fail with an error:
SYSTEM 'hello';
Make sure that the system command is not trying to run a function or program that is not in your path or that is not applicable to the environment.
Make sure that you have provided a user ID and password when connecting to the database server. The database server must have the user's password in order to execute a command on behalf of that user.
On Windows platforms, make sure the following Advanced User Rights have been assigned to user "informix": Act as part of the operating system; Increase quotas; Replace a process level token.
The following example shows a statement that will fails with error -668 and the ISAM error explanation '-255 Not in a transaction':
SYSTEM 'exit 255';
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-668 fires when a SYSTEM statement (SPL's mechanism for running an OS-level command) either
fails to launch the command or the command itself exits with a non-zero status — per the official
guidance, either an OS-level system call failed, or the executed command completed but reported
failure via its exit status.
- The command referenced doesn't exist or isn't accessible to the server process, per the official guidance — a typo in the command name, or a missing executable/script.
- Insufficient user credentials/permissions for the server's OS user to run the command, per the official guidance.
- On Windows specifically, the
informixuser lacking required Advanced User Rights, per the official guidance — a platform-specific permission requirement. - The command itself ran but its logic failed, returning a non-zero exit status for a reason internal to that command, independent of any Informix-side problem.
Solutions / Resolution
- Confirm the system command references a valid, accessible program/script, per the official guidance — check the exact path and that it's executable by the server's OS user.
- Confirm proper user credentials are in place for the database server connection, per the official guidance.
- On Windows, confirm the
informixuser has the specific Advanced User Rights required, per the official guidance — consult platform-specific Informix installation documentation for which rights are needed. - If the command itself is the issue, test it directly outside of Informix (run it manually as the server's OS user) to isolate whether the failure is in Informix's invocation or in the command's own logic.
Examples
Testing the command directly as the server's OS user
$ su - informix -c '/path/to/the/command arg1 arg2'
$ echo $?
Confirm the command runs successfully and returns a zero exit status when run manually as the same OS user the database server uses.
Diagnostic Checks
- Confirm the command path is correct and executable by the server's OS user.
- Run the command manually as that OS user to isolate an Informix-side invocation problem from a failure in the command's own logic.
- On Windows, check the
informixuser's Advanced User Rights assignment.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -668 in this set yet.
Test the command directly as the server's OS user first — that isolates whether the problem is in Informix's invocation or in the command itself.