-
Hello,
I have an external procedure named sh.c which i compiled to sh.o using gcc -G -c sh.c to sh.o
then a library is created sh_lib then i have to create the procedure.
when i say exec sh('ls') its suppose to give me a return of ls (unix command) referencing note: 99136.1 @ metalink.
this is the error i am getting. I am running this under the user apps schema in oracle 8i under solaris 2,6
SQL> exec sh('ls')
BEGIN sh('ls'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SH' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
-
re-read the note and follow it explicitly.
you need to create a wrapper procedure called "shell" which points to "sh", then when you do the exec statement you use "exec shell" (which is the wrapper procedure), not "exec sh"