korn shell executed using stored procedure....problem :(
Posted in 2006
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET
Hi all, I have a korn shell script which executed using the "system" command in a stored procedure. Everything works fine when I ran the stored procedure inside the server. However, it behave abnormally when i ran the stored procedure in a sql editor (connected to the informix server using ODBC connection). Does anyone have any idea what is the possible cause? Thanks a lot for your help.
May be you are logged on as a different user....????? --it behave abnormally define what that means please; eq errors or?? Superboer. ggk517@gmail.com schreef: > Hi all, > > I have a korn shell script which executed using the "system" command in > a stored procedure. > Everything works fine when I ran the stored procedure inside the > server. However, it behave abnormally when i ran the stored procedure > in a sql editor (connected to the informix server using ODBC > connection). Does anyone have any idea what is the possible cause? > Thanks a lot for your help.
Hi, a stored procedure always runs inside the server. You cannot run a stored procedure in an sql editor (or any other client). You probably have to think about how you connect to the server in your two cases. The reason for different behaviour may be that you are a different user (with different user ID and access permissions). E.g. you can use the command "id" (or even "id -a") inside your script to find out. (Redirect the output to a file that you then can read after execution ...) Regards, Martin -- Martin Fuerderer IBM Informix Development Munich, Germany Information Management Visit one of the upcoming Infobahn events in Germany to get up-to-date information on Informix products: - June 20, 2006 at the IBM Forum Muenchen - June 21, 2006 at the IBM Forum Frankfurt - June 22, 2006 at the IBM Forum Berlin For more please see: http://www.ibm.com/de/events/infobahn/ informix-list-bounces@iiug.org wrote on 16.06.2006 07:06:21: > Hi all, > > I have a korn shell script which executed using the "system" command in > a stored procedure. > Everything works fine when I ran the stored procedure inside the > server. However, it behave abnormally when i ran the stored procedure > in a sql editor (connected to the informix server using ODBC > connection). Does anyone have any idea what is the possible cause? > Thanks a lot for your help. > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list
ggk517@gmail.com wrote: > Hi all, > > I have a korn shell script which executed using the "system" command in > a stored procedure. > Everything works fine when I ran the stored procedure inside the > server. However, it behave abnormally when i ran the stored procedure > in a sql editor (connected to the informix server using ODBC > connection). Does anyone have any idea what is the possible cause? > Thanks a lot for your help. > > This may be beating a dead horse, but do you have #!/bin/ksh as the first line of the program (so it actually runs in Korn shell)? -- Everything works -- if you let it.