Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to write data to OS pipe using PL/SQL

Re: How to write data to OS pipe using PL/SQL

From: Gollum <gollum_nospam_at_worldonline.dk>
Date: Fri, 16 Mar 2001 22:16:06 +0100
Message-ID: <sovs6.3681$44.315908@news010.worldonline.dk>

The DBMS_PIPE package is sort of a PL/SQL to PL/SQL pipe.

To write into an OS pipe you will need to interact with the operating system, which can be done in several ways (depending on your level of synchronization etc):

  1. Write a Pro*C program that uses DBMS_PIPE to receive requests/data from PL/SQL programs and then writes data into the OS pipe using standard C functions.
  2. Use the external procedure feature to invoke the OS pipe functions directly from the PL/SQL programs (no need for DBMS_PIPE).
  3. Use UTL_FILE to write your data to an external file and then look in this file for data to write to the OS pipe.

There are probably other approaches than these.

Method (3) is far the simplest to implement but it is asynchronous. Method (1) is the Oracle7 approach, whereas method (2) can be used with Oracle8 and later.

I would prefer (2) as the more sophisticated solution, but note that setting up external procedures might cause you some problems (lot of people find it hard to setup).

HTH,
Gollum

"Szymon" <smanduk_at_profidata.com.pl> wrote in message news:98tjq0$og$1_at_news.tpi.pl...
> Hello!
>
> How to write data into an OS pipe from PL/SQL procedure?
>
> I have to write C programme acting similar to ftp-deamon.
> Programme waits for data to be placed in pipe by PL/SQL routine,
> then sends the data futher to a non-Oracle RDBMS.
>
> I'm looking for possible solutions.
>
> I found dbms_pipe package which implements, as far as I understood its
> description,
> communication of messages between database sessions based on internal to
> Oracle memory
> structures. So I think this is not what I'm looking for.
>
> Any ideas, comments, suggestions?
>
> BTW, communication is bidirectional so I have to write another programme,
> which will place recieved data into Oracle database.
> But I think this can be done using Pro*C/C++ precompiler.
>
> TIA
>
> Simon
>
> P.S. I'm not an expert in Oracle technology so please be understanding if
> the question is vague.
>
>
>
>
Received on Fri Mar 16 2001 - 15:16:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US