Urgent help needed.
Posted in 2000
Topics: Stored Procedures & SPL
We just migrated from informix 5.10 to informix 9.20 (sun/solaris 2.6)
We have encountered a problem that I am hoping someone has already
solved. I did browse the archives and did not find an appropriate
answer:
We have a number of stored procedures that use the SYSTEM command to
execute programs on the server (we are in a client/server configuration)
These worked fine for all users under version 5.10, and no longer work
for some users under version 9.20
the users get the following error:
668: System command cannot be executed. 2: No such file ordirectory
We have found that the users that see this problem have their SHELL
environment variable set without a path (SHELL=csh) or to a shell that
does not exist in the server (i.e. SHELL=/usr/local/bin/zsh)
If the user sets the SHELL variable to the full path of a shell that is
also available in the server then they no longer get the error.
(if tried many other approaces before finding this. Like executing a
shell scrip or simple echo into mail commans, the shell itself ... but
nothing made a difference. It looks like what the engine is doing is
trying to execute $SHELL <arg_to_the_system_command>
How can overcome this problem? Having the users change their SHELL
variable is not really an option as it has concequences beyond the
conection to the database server and use of our app and tools (the user
accounts are not exclusively for usage of our app/tools)
I don't understand why the engine would use the client's SHELL env
variable to determine the shell to execute. Shouldn't that be a server
configuration? Can it be overwritten on the server
Any information or ideas greatly appreciated
xavier
Put the following in the first line of your shell scripts
#!/bin/csh
or whatever shell you want to run with.
This tells the shell scripts which shell you wish to run with.
Sean
Xavier Trevisani wrote:
> We just migrated from informix 5.10 to informix 9.20 (sun/solaris 2.6)
>
> We have encountered a problem that I am hoping someone has already
> solved. I did browse the archives and did not find an appropriate
> answer:
>
> We have a number of stored procedures that use the SYSTEM command to
> execute programs on the server (we are in a client/server configuration)
> These worked fine for all users under version 5.10, and no longer work
> for some users under version 9.20
>
> the users get the following error:
>
> 668: System command cannot be executed. 2: No such file or> directory
>
> We have found that the users that see this problem have their SHELL
> environment variable set without a path (SHELL=csh) or to a shell that
> does not exist in the server (i.e. SHELL=/usr/local/bin/zsh)
>
> If the user sets the SHELL variable to the full path of a shell that is
> also available in the server then they no longer get the error.
>
> (if tried many other approaces before finding this. Like executing a
> shell scrip or simple echo into mail commans, the shell itself ... but
> nothing made a difference. It looks like what the engine is doing is
> trying to execute $SHELL <arg_to_the_system_command>
>
> How can overcome this problem? Having the users change their SHELL
> variable is not really an option as it has concequences beyond the
> conection to the database server and use of our app and tools (the user
> accounts are not exclusively for usage of our app/tools)
>
> I don't understand why the engine would use the client's SHELL env
> variable to determine the shell to execute. Shouldn't that be a server
> configuration? Can it be overwritten on the server
>
> Any information or ideas greatly appreciated
>
> xavier
In article <39B6C416.E08DB9C5@bbn.com>,
xtrevisa@bbn.com wrote:
Hello Xavier.
Please try this sample program.
#include <stdio.h>
$include sqlca;
main()
{
printf( "sample program is running.\\n\\n");
$ database "stores_demo";
system("ls");
printf("\\n");
system("/bin/csh -c ls");
printf("\\n");
system("/bin/ls");
printf("\\n");
printf("\\nterminate.\\n");
}
if machine is client, please run this command and make.
% setenv DBPATH //<INFORMIXSERVER>
--
Tsutomu Ogiwara from japan.
>
>
> We just migrated from informix 5.10 to informix 9.20 (sun/solaris
2.6)
>
> We have encountered a problem that I am hoping someone has already
> solved. I did browse the archives and did not find an appropriate
> answer:
>
> We have a number of stored procedures that use the SYSTEM command to
> execute programs on the server (we are in a client/server
configuration)
> These worked fine for all users under version 5.10, and no longer
work
> for some users under version 9.20
>
> the users get the following error:
>
> 668: System command cannot be executed. 2: No such file or> directory
>
> We have found that the users that see this problem have their SHELL
> environment variable set without a path (SHELL=csh) or to a shell
that
> does not exist in the server (i.e. SHELL=/usr/local/bin/zsh)
>
> If the user sets the SHELL variable to the full path of a shell that
is
> also available in the server then they no longer get the error.
>
> (if tried many other approaces before finding this. Like executing a
> shell scrip or simple echo into mail commans, the shell itself ...
but
> nothing made a difference. It looks like what the engine is doing is
> trying to execute $SHELL <arg_to_the_system_command>
>
> How can overcome this problem? Having the users change their SHELL
> variable is not really an option as it has concequences beyond the
> conection to the database server and use of our app and tools (the
user
> accounts are not exclusively for usage of our app/tools)
>
> I don't understand why the engine would use the client's SHELL env
> variable to determine the shell to execute. Shouldn't that be a
server
> configuration? Can it be overwritten on the server
>
> Any information or ideas greatly appreciated
>
> xavier
>
Sent via Deja.com http://www.deja.com/
Before you buy.