Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

unable to write a binary file using utl_file. Please help.

670117Nov 12 2008 — edited Nov 14 2008
I am unable to generate a binary file, see the code below. The same code works fine if I specify file_open mode as "w" instead of "wb" and creates a file in the directory. I have permission to write to directory. Please help me if there is anything else that needs to be done to get binary file generated.

declare
l_output utl_file.file_type;
begin
l_output := utl_file.fopen( 'RM_MHE_IN_DIR', 'test.dat', 'wb' );
utl_file.put_raw( l_output, utl_raw.cast_to_raw('hello world') );
utl_file.fclose( l_output );
end;
/

ORA-29281: invalid mode
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2008
Added on Nov 12 2008
5 comments
1,403 views