标签:
UTL_FILE.FOPEN(location in varchar2, filename in varchar2, open_mode in varchar2) return FILE_TYPE; Location 是路径参数, FILENAME 是文件名, OPEN_MODE是打开模式,‘R‘是读文本,‘W‘是写文本,‘A‘是附加文本,参数不分大小写,如果指定‘A‘但是文件不存在,它会用‘W‘先创建出来,‘W‘有覆盖的功能; 其中的location并不能简单的指定为‘D:/temp‘等路径,要建立一个DIRECTORY变量并付给权限(必须以DBA身份登录): create or replace directory UTL_FILE_DIR as ‘G:\oracle\temp‘ ; grant read ,write on directory UTL_FILE_DIR to scott; GRANT EXECUTE ON utl_file TO scott;
——————————————————————————————————————————————————————————————————————————————
http://zhangzhongjie.iteye.com/blog/1903024
http://www.2cto.com/database/201411/349979.html
标签:
原文地址:http://www.cnblogs.com/mengyuxin/p/5469213.html