On Thu, 11 Dec 2003 21:40:00 +0100, Sybrand Bakker
<gooiditweg_at_sybrandb.nospam.demon.nl> wrote:
>On Thu, 11 Dec 2003 19:56:32 +0100, Peter Weidner
><weidnerp_at_t-online.de> wrote:
>
>>Hello friends
>>
>>I have a problem with UTL_File under Oracle 9.2i there - operating
>>system Windows 2000 Professional.
>>
>>Following: I have a procedure in a Package, that reads from an
>>Utl_File and also passes out something into an Utl_File again. Until
>>this Package as well as this procedure perfectly worked two weeks ago.
>>Then however I had a Crash on my computer, I had to install everything
>>again. From this time works my Package as well as procedure no longer.
>>Although is all right, in the Init.I have ora file Utl_File_Dir = *
>>put down and I have installed also the Utl-Package, the corresponding
>>User the right given and nevertheless I can access my corresponding
>>Utl-Fileses no longer. Already with the OPEN of the file, I receive a
>>mistake and it becomes said that the file-name unknown is.
>>Has somebody of you an idea what there can be wrong??.
>>I think, that something doesn't work as right as it in the system
>>should, because as said, the procedure perfectly ran before the Crash.
>>Is grateful for each help.
>>
>>Peter Weidner
>>
>>P.S. I hope, you can read my English moderately.Still something, I let
>>my procedure run under TOAD version 7.6.
>
>Your English isn't the problem. Leaving out the exact error message
>is, and will not get you any sensible responses, and obviously no one
>is going to crash his system to reproduce your problem ;-)
Hello Sybrand,
Thanks for your answer.
The problem is, that I get no right error message, is. Only the
following text appears and the cursor stops with the stated line.
"An Oracle exception has occured in your code. If the code contains an
exception handler, you can continuing stepping thru the handler;
otherwise, the error message will display and the next step will exit.
executíon".
After them following error messages appears:
An exception occured in the anonymus block.
Check for syntax errors in the "Set Parameters" dialog.
ORA-04068
ORA-04067
ORA-06508
ORA-06512
there is a part of my code:
The cursor stops by the FILE OPEN - statement
/************************************
- M A I N P R O G R A M M ***
*************************************/
BEGIN
BEGIN
dbms_output.put_line(c_location||' '||c_filename_in);
v_handle_in := Utl_File.Fopen (
location => c_location,
filename => c_filename_in,
open_mode => 'r',
max_linesize => 32767 );
v_handle_out := Utl_File.Fopen (
location => c_location,
filename => v_filename_out,
open_mode => 'w',
max_linesize => 32767 );
EXCEPTION
when
- ORA-29287: invalid maximum line size
Utl_File.Invalid_Maxlinesize
then
- Fclose_All closes all open files for this session.
- It is for cleanup use only. File handles will not be cleared
- (Is_Open will still indicate they are valid)
Utl_File.Fclose_All;
Raise_Application_Error ( -20000, 'Invalid_Maxlinesize trapped'
);
when
- ORA-29282: invalid file ID
Utl_File.Invalid_Filehandle
then
Utl_File.Fclose_All;
Raise_Application_Error ( -20000, 'Invalid_Filehandle trapped' );
WHEN utl_file.invalid_path THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_path');
WHEN utl_file.invalid_mode THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_mode');
WHEN utl_file.invalid_operation THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_operation');
WHEN utl_file.read_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.read_error');
WHEN utl_file.write_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.write_error');
WHEN utl_file.internal_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.internal_error');
- WHEN OTHERS THEN
- Utl_File.Fclose_All;
- RAISE_APPLICATION_ERROR(-20001, 'utl_file.other_error');
end;
--
BEGIN
LOOP
--
-- Get Line aus Inputfile
--
v_line_2 := null;
utl_file.get_line (file => v_handle_in, buffer => v_line);
write_line;
END LOOP;
EXCEPTION
when NO_DATA_FOUND then
Utl_File.Fclose_All;
END;
EXCEPTION
when
- ORA-29287: invalid maximum line size
Utl_File.Invalid_Maxlinesize
then
- Fclose_All closes all open files for this session.
- It is for cleanup use only. File handles will not be cleared
- (Is_Open will still indicate they are valid)
Utl_File.Fclose_All;
Raise_Application_Error ( -20000, 'Invalid_Maxlinesize trapped' );
when
- ORA-29282: invalid file ID
Utl_File.Invalid_Filehandle
then
Utl_File.Fclose_All;
Raise_Application_Error ( -20000, 'Invalid_Filehandle trapped' );
WHEN utl_file.invalid_path THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_path');
WHEN utl_file.invalid_mode THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_mode');
WHEN utl_file.invalid_operation THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_operation');
WHEN utl_file.read_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.read_error');
WHEN utl_file.write_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.write_error');
WHEN utl_file.internal_error THEN
Utl_File.Fclose_All;
RAISE_APPLICATION_ERROR(-20001, 'utl_file.internal_error');
-- WHEN OTHERS THEN
-- Utl_File.Fclose_All;
-- RAISE_APPLICATION_ERROR(-20001, 'utl_file.other_error');
end;
--
END migrtest;
/
That is a part of my code:
Received on Mon Dec 15 2003 - 17:46:09 CST