请教大佬谁清楚这个错误什么意思啊oracle中的 ORA-06512: at "SYS.UTL_FILE", line 475错误

随心の随缘 2018-09-12 03:23:33
执行时若系统卡死再次执行 会报ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line 475错误, 但是清空目录后有可以正常运行

这是核心逻辑sql
v_file_handle utl_file.file_type; --句柄

v_cnt number(5);
v_iloop int;
begin
v_iloop := 0;
declare cursor c_sc_retdata is
select t.mer_code||'`'||t.busi_type msg from tc_agent_pay t
BEGIN
v_file_handle:=utl_file.fopen('JHTDATA',v_file,'W');
for v_retdata in c_sc_retdata 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;
...全文
926 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
可乐乐可 2018-09-13
  • 打赏
  • 举报
回复
declare
v_file_handle utl_file.file_type%rowtype; --句柄
v_cnt number(5);
v_iloop int;
V_msg varchar2(100);

cursor c_sc_retdata is
select t.mer_code||'`'||t.busi_type msg from tc_agent_pay t;
BEGIN
v_iloop := 0;
v_file_handle:=utl_file.fopen('JHTDATA',v_file,'W');
open c_sc_retdata;
loop
fetch c_sc_retdata into V_msg;
exit 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;
close c_sc_retdata;
utl_file.fClose(v_file_handle);
end;

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧