nJoshi
nJoshi

Reputation: 376

Informix error when calling a procedure

Recently I had an informix database server cloned. I created a new stored procedure called sp_foo.

When I run the below SQL to execute a procedure

EXECUTE PROCEDURE sp_foo();

I get the below error when I call a stored procedure.

Error: The system command cannot be executed or it exited with a non-zero status. (State:S1000, Native Code: FFFFFD64)

I'm a little baffled as to why I would get this error. INFORMIX does not give me any additional data to find what is causing the problem.

PS: I'm new to INFORMIX and I'm using WinSQL/Informix ODBC to run the SQL. Also when I ran the SQL in the original server there were no errors.

Upvotes: 1

Views: 1838

Answers (1)

RET
RET

Reputation: 9188

Hard to give a definitive answer with so little to go on, but it certainly looks like a permissions or environment problem. A SYSTEM() call inside the SP is attempting to execute an operating system command, and it is either unable to find it, or it is failing.

The fact that the SP works when you run it on the server suggests to me that either:

  1. When executed via ODBC it is running under a different user account with different privileges, or
  2. The command being executed by the SYSTEM() call is relying on environment variables that exist when you invoke the script on the server, but are not in place when called via ODBC.

I suspect the latter is more likely.

Upvotes: 2

Related Questions