Home > database >  O ask bosses who knows what this error means of oracle ORA - 06512: the at "SYS. UTL_FILE"
O ask bosses who knows what this error means of oracle ORA - 06512: the at "SYS. UTL_FILE"

Time:09-21

If execution system is jammed again will be submitted to the ORA - 29283: invalid file operation ORA - 06512: an "SYS. UTL_FILE", line 475 errors, but empty directory can be run normally after

This is the core logic SQL
V_file_handle utl_file. File_type; - handle

V_cnt number (5);
V_iloop int.
The begin
V_iloop:=0;
Declare cursor c_sc_retdata is
The select t.m er_code | | '`' | | t.b usi_type MSG from tc_agent_pay t
The BEGIN
V_file_handle:=utl_file fopen (' JHTDATA v_file, 'W');
For v_retdata c_sc_retdata in loop
If v_iloop=0 then
V_iloop:=1;
end if;
Utl_file. Put_line (v_file_handle v_retdata. MSG);
END LOOP;
Utl_file. FClose (v_file_handle);
end;

CodePudding user response:

 declare 
V_file_handle utl_file. File_type % rowtype; - handle
V_cnt number (5);
V_iloop int.
V_msg varchar2 (100);

Cursor c_sc_retdata is
The select t.m er_code | | '`' | | t.b usi_type MSG from tc_agent_pay t;
The BEGIN
V_iloop:=0;
V_file_handle:=utl_file fopen (' JHTDATA v_file, 'W');
The open c_sc_retdata;
Loop
The fetch c_sc_retdata into V_msg;
Exit the when c_sc_retdata % notfound;
If v_iloop=0 then
V_iloop:=1;
end if;
Utl_file. Put_line (v_file_handle V_msg);
END LOOP;
The close c_sc_retdata;
Utl_file. FClose (v_file_handle);
end;
  • Related