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!

Unicode characters in file name

908973Jan 5 2012 — edited Jan 7 2012
Hi,

I try to open a file (using UTL_FILE functionalities) whose name contains polish characters (e.g. 'test-ś.txt').
In return, I get error message:

ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 633
ORA-29283: invalid file operation

Error is not due to missing rights on file/directory because when I replace the polish character by a latin one, file is opened successfuly.

I also tried to rename a file (using UTL_FILE.FRENAME) from latin to polish characters (e.g 'test-s.txt' -> 'test-ś.txt').
File is renamed but polish characters are lost (final result is something like 'test-Å›.txt').

What's wrong with my environment or code?

Thanks in advance for your help,
Arnaud



Here's my environment description, PL/SQL code and results.

Environment:
OS Windows in Polish for client box
* code page ACP=1250
* NLS_LANG=POLISH_POLAND.EE8MSWIN1250

OS Windows in US/English for database server
* code page ACP=1252
* NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Oracle 10.2.0.5
* NLS_CHARACTERSET=AL32UTF8
* NLS_NCHAR_CHARACTERSET=AL16UTF16

Tests are executed from SQL Developer on client box.
The file I'm trying to open is located on database server.
So, Oracle Directory path used in FOPEN procedure is something like '\\server\directory'.

PL/SQL code:
-----------------------------------------------------------
SET SERVEROUTPUT ON;
declare
Message varchar2(1000);
Filename varchar2(1000); -- nvarchar2(1000);
FileHandler UTL_FILE.FILE_TYPE;
OraDir varchar2(30) := 'SGINSURANCE_DIR_SOURCE';
begin
dbms_output.enable(10000);

--Filename := 'test-s.txt';
Filename := 'test-ś.txt';

Message := 'Opening file ['||Filename||']';
dbms_output.put_line(Message);

--FileHandler := UTL_FILE.FOPEN_NCHAR(OraDir, Filename, 'r');
FileHandler := UTL_FILE.FOPEN(OraDir, Filename, 'r');

Message := 'Closing file';
dbms_output.put_line(Message);

UTL_FILE.FCLOSE(FileHandler);

exception
when others then
Message := 'Error: '||SQLERRM;
dbms_output.put_line(Message);

if UTL_FILE.IS_OPEN(FileHandler) then
Message := 'Closing file ['||Filename||']';
dbms_output.put_line(Message);
UTL_FILE.FCLOSE(FileHandler);
end if;
end;
-----------------------------------------------------------


Results:
Test with polish characters -> error ORA-29283: invalid file operation
-----------------------------------------------------------
anonymous block completed
Opening file [test-ś.txt]
Error: ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
-----------------------------------------------------------

Test without polish characters -> no error
-----------------------------------------------------------
anonymous block completed
Opening file [test-s.txt]
Closing file
-----------------------------------------------------------

Comments

SureshM-Oracle

Are you triggering import via Batch or through manual process?

Does the process logs shows two ODI process that gets execute one after another?

What version of FDMEE are you in?

athlon007

Hello,

The import is triggered manually

The process logs shows different ODI process numbers.

FDMEE version 11.1.2.4.210

Thanks alot for helping

Roman

SureshM-Oracle

Is it a distributed environment? If yes, do you have multiple FDMEE servers?

I would advise to raise an SR with Oracle Support at this point in time to review your environment and provide you the solution.

athlon007
Answer

Hello,

In case somebody else runs into this issue it was the following:

Since Upgrading to Windows 10 our FDMEE import from a Staging table never stopped, it just kept reimporting after the validation step.

Solution was to amend the timeout setting in our Load Balance from 5min to 10min.

Hope this may help somebody else once.

Cheers

Marked as Answer by athlon007 · Sep 27 2020
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 4 2012
Added on Jan 5 2012
5 comments
3,190 views