Re: Stored Procedure - cannot include a system call
Posted in 1998
Hi Kate,
What you need to do is create a shell script with all your commands in it
and make sure the permissions on that are all set ok then call that script
explicitly.
I do not think you can execute UNIX command with parameters from a
stored procedure. We ran into this and the simplest way was
to wrap what you want to do in a shell script.
eg.
-----------------------------------------
CREATE dba PROCEDURE call_wo (vwo INT)
system "myscript.sh ";END PROCEDURE
-----------------------------------------
Hope it helps
Graham Mitchell
graham.mitchell@aethos.co.uk
kcj@mechoshade.com wrote:
> When I include a system call in a stored procedure I get an error when I
> attempt to execute it.
>
> 668: System command cannot be executed.
> 1: Not owner>
> I am the owner of the database. I get the same message when I log on as
> /usr/informix
>
> The stored procedure is as follows:
> -----------------------------------------
> CREATE dba PROCEDURE call_wo (vwo INT)
> system "echo 'test this'";> END PROCEDURE
> -----------------------------------------
>
> Can anyone give me any ideas as to what could be wrong here.
>
> I am running INFORMIX se 7.10 under SCO 3.2.4.2
>
> Kate Juliff
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own