Re: Can print to file in PL/SQL?

From: Sundar Raghavan <sundar_at_tcs.com>
Date: 1995/09/17
Message-ID: <43ibuc$ecj_at_tcsi.tcs.com>#1/1


Pauli Salmu <p.salmu_at_mn.medstroms.se> wrote:

>You only need to drop the obsession with files. You can create
>a debug message table and insert stuff there. Of course saving it
>depends a bit on how your program must handle commit/rollback but
>perhaps your c program could select and print data immediately from
>that table in error situations.

Please note that, at a physical level the data saved to a table is written to the disk (after a commit). So, saving error/debug messages to a table, reading it later and writing to a file will involve twice the number of I/O operations. Plus the associated housekeeping cost of creating the error message table, maintaining it and so on.

The pipes mechanism is an "okay" alternative, until Oracle comes up with their next piecemeal (7.3 or so).

One caveat in using pipes is that your pipe must be ready to receive before your PL/SQL actually starts writing to it.

sundar Received on Sun Sep 17 1995 - 00:00:00 CEST

Original text of this message