Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: FOPEN returning errors
"tk" <theronk_at_charter.net> wrote in message
news:vjf3qn32f632d1_at_corp.supernews.com...
> Hi Folks:
>
> More frustrating than I initially thought... I'm trying to run some of
the
> Oracle file io samples...
>
> I am getting the following error from a test package:
> SQL> BEGIN
> 2 Debug.TestIt;
> 3 END;
> 4 /
> BEGIN
> *
> ERROR at line 1:
> ORA-29280: invalid directory path
> ORA-06512: at "SYS.UTL_FILE", line 18
> ORA-06512: at "SYS.UTL_FILE", line 424
> ORA-06512: at "TKOUSEK.DEBUG", line 7
> ORA-06512: at line 2
> =================================================================
>
> The errors happening on the FOPEN call...
>
> SO here's my init.ora file entry (I am using Windows 2000)
> UTL_FILE_DIR=c:\tmp
>
> and the package body for TestIt
> PROCEDURE TestIt
> IS
> BEGIN
> v_DebugHandle := UTL_FILE.FOPEN('\tmp', 'testFile.txt', 'w');
> END TestIt;
> =================================================================
>
> For the first parm, I alread tried: '/tmp', 'c:\tmp'. 'c:/tmp'....
>
> I also made sure the Windows 2000 permissions on c:\tmp were "Open" which
> they are...
Hi
I'm pretty sure that you'd need 'c:\tmp' for the first parameter, as that is the directory name that you are specifying in init.ora. You would also need c:\tmp to actually exist - and not as may well be more likely c:\temp. As the error message you are getting indicates Oracle can't actually find the directory /tmp on the database server (which isn't that surprising given it looks like a Unix style name).
Finally what exact permissions have been set at the OS level for the account that runs the Oracle software (usually this won't be an issue because the account is normally a local admin account but you never know). Open isn't a windows 2000 file permission.
-- Niall Litchfield Oracle DBA Audit Commission UKReceived on Mon Aug 11 2003 - 10:48:12 CDT
![]() |
![]() |