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: Problem with some simple PL/SQL.

Re: Problem with some simple PL/SQL.

From: Chris ( Val ) <chrisval_at_bigpond.com.au>
Date: 24 Jul 2005 18:18:05 -0700
Message-ID: <1122254285.331122.183460@f14g2000cwb.googlegroups.com>

Paul wrote:
> Rene Nyffenegger <rene.nyffenegger_at_gmx.ch> wrote:
>
> >The exact text and/or number of error messages is useful (!= "it didn't work!").
>
>
> SP2-0735: unknown SET option beginning "utl_file_d..."
>
>
> Hoist by my own petard!!! 8-)
>
>
> >Try:
> >alter system set utl_file_dir='c:\temp' scope = spfile;
> >Then restart the database.
>
>
> This worked! Merci + Danke!
>
>
> God, this damn Oracle thing is so complex that sometimes I feel as if
> I'll never get the hang of it!

I started out just wanting to dabble in PL/SQL (and I still do), but now I find that I'm getting interested in much more than just PL/SQL. So yep, it is large and complex - I concur ;-)

> One thing is confusing me though, the in file init.ora.55200519471
> which is in D:\oracle\admin\MyDB\pfile was, I thought, the one for the
> db, but it's mod date and time are still from a few hours ago. Where
> is the file that has obviously been modified?

>From my understanding, you only require the setting of the utl_file
path in the init.ora for earlier versions of Oracle. The new method is to create an Oracle directory (an Oracle abstraction of a real directory).

create directory YourDirAliasName as 'C:\YourRealDirectory';

Ensure you have the create directory privilege and appropriate O/S permissions to read and write to the real directory as the Oracle user.

That should be all that you need for Oracle 9iR2.

Oh, and as I found out recently, I had to use 'UPPER()':

For example:

    utl_file.fopen( UPPER(MyDir), MyFile, 'r' );

... for it to work, otherwise I got a bad path error as well.

HTH. Cheers,
Chris Val Received on Sun Jul 24 2005 - 20:18:05 CDT

Original text of this message

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