DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Creating External Procedure: Please help

  1. #1
    Join Date
    Aug 2000
    Location
    Chicago IL
    Posts
    586
    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

  2. #2
    Join Date
    Jun 2000
    Posts
    417
    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"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width