Re: Calling C Progs in Oracle 7

From: Steve A. Olson <solson_at_access1.digex.net>
Date: 18 Apr 1994 04:25:47 GMT
Message-ID: <2ot24b$97u_at_news1.digex.net>


Michael Magan (mmagan_at_nl.oracle.com) wrote: : In <Co3szC.AFo_at_amiserv.chi.il.us> billf_at_amiserv.xnet.com (Bill Froelich) writes:  

: >Is it possible to call a C program from within a stored procedure
: >or trigger in Oracle 7?
 

: Database pipes is the mechanism to use to implement this: Yes!

There are some very tricky issues when using database pipes.

  1. The program that is reading the pipe, the server, must maintain a seperate database 'connection' which means that it cannot "see" any uncommitted data from the calling database procedure.
  2. Keep in mind that this background process will 'serve' ALL requests from ALL sessions that execute the database procedure. A possible performance bottleneck. --Although-- more than one 'server' can listen to the same pipe.
  3. In order to respond back to the calling database procedure and if you are using multiple 'servers', the two sides must dynamically determine a reply pipe-- best to use unique_session_name in the database procedure and send it through the pipe as the reply channel.
  4. Don't attempt to do anything that would be considered within the calling database procedure's transaction that you would want rolled back if the caller fails to commit later.

BTW, I've started to write a "USER_EXIT" package that functions somewhat like the forms USER_EXIT packaged procedure.

Comments Welcome.

Steve Olson
Applied Information Technologies, Inc.
solson_at_ait.cst.com Received on Mon Apr 18 1994 - 06:25:47 CEST

Original text of this message