I want to call a C program from PL/SQL. I need to pass the C program a block of data and return results. I have checked the Oracle books that I have and can not find any way to do this.
Two ways to do this: the old way and the new way.<br>
<br>
The old way involved using the DBMS_PIPE pipe between the PL/SQL procedure/function/trigger and a "C" program. This package became part of the Oracle RDBMS with 7.0, but there were lots of bugs prior to 7.1.6. It's not very documented in the standard Oracle doc-set, but I'm certain that Steve Feuerstein explained it thoroughly in at least one of his three books on PL/SQL! It's possible that an example is available on Oracle Support's "Metalink" site (support.oracle.com/metalink)...<br>
<br>
The "new" way came in with Oracle8.0, and it is "external procedures", documented in chapter 10 of the PL/SQL reference manual. Again, I'm sure that Steve has documented it thoroughly, and there may be code fragments or other help on MetaLink...<br>
<br>
Last, the older Oracle Procedural Gateway product included an SDK (software developers kit), of which only 6 copies were ever sold (I've been told)! As a result, Oracle pulled it off the market, but if that's not true, you can build a really high-end custom solution with the PGDK. To be honest, I think the "external procedures" functionality occupies the same space as the old PGDK, so it probably wouldn't be money well spent!<br>
<br>
Hope this helps...<br>
<br>
-Tim
Update on my previous answer: I recently had the pleasure of using "external procedures" on two recent engagements, and it's great! It's well-documented ("Oracle8 PL/SQL Reference", chapter 10 and "Oracle8 Administration", chapter on "Managing Processes" and demos in "$ORACLE_HOME/plsql/demo") and provides great performance. No memory leaks or anything like that. I was using v8.0.5 on both occasions, once on HP-UX 11 and the other time on Solaris 2.x (not sure which version)...<br>
<br>
...it's much less complicated than the old PGDK...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.