Re: UTL_FILE, first attempts at using!

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/05/27
Message-ID: <338b3d4f.23198868_at_newshost>#1/1


PL/SQL that is run in SQL*Plus runs on the server, not on the client. This pl/sql code does not have any access whatsoever to the local file system. Anything created/read by utl_file is done completely on the machine where the Oracle instance is executing. In order for utl_file to write to your file system, your file system would have to be accessible on the server where Oracle is.

"spool filename" coupled with set serveroutput on and dbms_output is currently the only way to achive pl/sql file IO from sql*plus to your local disk.

If you are using Developer or some tool like that where the PL/SQL is executed on the client as opposed to the server, you may use the TEXT_IO package to read/write local (non server based) file systems.

On Tue, 27 May 1997 14:15:23 -0500, Larry Jones <lljo_at_chevron.com> wrote:

>Current Environment:
>
> SQL*Plus: Release 3.3.2.0.2
> Oracle7 Server Release 7.3.2.3.0
> PL/SQL Release 2.3.2.3.0
> Unix (Solaris) Server
> Windows 95 client
>
>I am wanting to write flat files to my PC workstation, using this
>utility, and now I am finding out that I got my hopes up by reading a
>paper from the recent Oracle conference. It led me to believe that I
>could do this, but my DBA locally says "nope".
>
>I assume the problem is b/c we run Oracle on a Unix box, so they can't
>set the required path parameter to something like "C:\TEMP", or
>whatever, since that is not valid on the Unix side of things. Can this
>parameter be set for the client side, or is it only a server side
>setting?
>
>I want to use PL/SQL through a SQL*PLUS window on the PC, to write
>output directly to a text file on my PC.
>
>Right now I can do it with the old temp file/spool command, but I've
>been waiting for something like this from Oracle for a long time, and I
>thought it was here.
>
>Does anyone know if this can be done?
>
>Thanks,

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue May 27 1997 - 00:00:00 CEST

Original text of this message