我想将一些异常信息写入某个文件中,但是上面的错误
file_handle := UTL_FILE.FOPEN('TMP', 'costexcp.txt', 'w',32767);
v_excpinfo := '单据号: '||Pi_sBillID||' 明细序号: '||Pi_iSeq||' 异常原因: 没有成本,需要手工输入成本!';
UTL_FILE.PUTF(file_handle, v_excpinfo||'\n');
UTL_FILE.FCLOSE(file_handle);
代码如上,请教大家,问题怎样解决,谢谢!
file_handle := UTL_FILE.FOPEN('TMP', 'costexcp.txt', 'w',32767);
v_excpinfo := '单据号: '||Pi_sBillID||' 明细序号: '||Pi_iSeq||' 异常原因: 没有成本,需要手工输入成本!';
UTL_FILE.PUTF(file_handle, v_excpinfo||'\n');
UTL_FILE.FCLOSE(file_handle);
代码如上,请教大家,问题怎样解决,谢谢!
解决方案 »
- oracle 11g管理员密码忘记!
- 如何把*.bcp文件导入SQL2000里面呀
- Merge有什么优点?
- 求助!急!SqlLoad中如何实现Where语句的功能
- 如何优化动态sql?各位高手请指点!!!
- 如何解决unique constraint violated 的问题
- 100分求一个复杂的sql语句 在线等.........
- Oracle有没有这样一个系统表:记录用户所创建的表的信息(表的字段、类型)
- 请问如何用Oracle建一个数据库,并发布出去,具体点,行吗?
- 分页显示遇到的问题-是否oracle 8 + tomcat 4 不能使用sqlRst.absolute ?困惑 ,读出的数据都是0X开头的"外星语"!
- 请高手帮忙对一个SQL作下优化
- 用Java如何启动和关闭Oracle(在线等)?
// *Cause: An attempt was made to read from a file or directory that does
// not exist, or file or directory access was denied by the
// operating system.
// *Action: Verify file and directory access privileges on the file system,
// and if reading, verify that the file exists.
1.在d盘创建了d:\testtmp目录
2.用sys用户登录到数据库(ora9i):conn sys/orcl@eai01 as sysdba
3.在sqlplus中运行create or replace directory TMP as 'd:\testtmp';
4. 在sqlplus中运行grant read,write on directory TMP to public
5.alter system set utl_file_dir='d:\testtmp' scope=spfile;
然后重启了数据库,为什么还不行呢
多谢!