Unix Technical Forum

Read error using UTL_FILE

This is a discussion on Read error using UTL_FILE within the Oracle Database forums, part of the Database Server Software category; --> Hi, we use UTL_FILE to read files in our PL/SQL Program. Today we got an exceptional file, which is ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 02:26 AM
Giridhar
 
Posts: n/a
Default Read error using UTL_FILE

Hi,
we use UTL_FILE to read files in our PL/SQL Program.
Today we got an exceptional file, which is greater than 2 GB.
our program failed with the error as:

SQLCODE <-29284> SQLERRM <ORA-29284: file read error>

Is there any restriction on the file size we can use with UTL_FILE?
In case if there is any restriction, is there any way to overcome this
restriction?

Thanks,
Giridhar Kodakalla.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 02:26 AM
sybrandb@yahoo.com
 
Posts: n/a
Default Re: Read error using UTL_FILE

If there is such a restriction it is either being caused by a 32-bit
O/S or by 32-bit database software.
UTL_FILE has only record limits, no file limits.
Obviously, using 32-bit Oracle, you can't create, read or write files
greater than 2G.
This restriction can be lifted by installing the 64-bit version of
Oracle.

--
Sybrand Bakker
Senior Oracle DBA

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 02:28 AM
Giridhar
 
Posts: n/a
Default Re: Read error using UTL_FILE

Thanks Sybrand for your reply.
I checked with our DBA and he confirmed that we are on 64 bit.
Do we get such errors even if we are on 64 bit database?
Details of our v$version is as follows, which also confirms we are on
64 Bit:

Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
PL/SQL Release 9.2.0.5.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - Production

Please guide me further to avoid such errors in future.

Thanks again.
Giridhar Kodakalla

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 02:29 AM
Rauf Sarwar
 
Posts: n/a
Default Re: Read error using UTL_FILE


Giridhar wrote:
> Thanks Sybrand for your reply.
> I checked with our DBA and he confirmed that we are on 64 bit.
> Do we get such errors even if we are on 64 bit database?
> Details of our v$version is as follows, which also confirms we are on
> 64 Bit:
>
> Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
> PL/SQL Release 9.2.0.5.0 - Production
> CORE 9.2.0.6.0 Production
> TNS for Solaris: Version 9.2.0.5.0 - Production
> NLSRTL Version 9.2.0.5.0 - Production
>
> Please guide me further to avoid such errors in future.
>
> Thanks again.
> Giridhar Kodakalla


If you have already checked the obvious i.e. filename and directory
names are valid and you have read/write access to the directory then
make sure that there aren't any lines in the file that exceed the max
linesize. When you do utl_file.fopen and do not specify the max
linesize as the last parameter then it is 1000 bytes by default. You
can specify any value between 1 and 32767.

Regards
/Rauf

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 02:29 AM
Matthias Hoys
 
Posts: n/a
Default Re: Read error using UTL_FILE


"Giridhar" <gkodakalla@gmail.com> wrote in message
news:1136468790.128064.162420@g44g2000cwa.googlegr oups.com...
> Hi,
> we use UTL_FILE to read files in our PL/SQL Program.
> Today we got an exceptional file, which is greater than 2 GB.
> our program failed with the error as:
>
> SQLCODE <-29284> SQLERRM <ORA-29284: file read error>
>
> Is there any restriction on the file size we can use with UTL_FILE?
> In case if there is any restriction, is there any way to overcome this
> restriction?
>
> Thanks,
> Giridhar Kodakalla.
>


Does your filesystem support files greater than 2 GB ? What OS are you using
?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:05 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com