回答:
1、utl_file是oracle的一个包,用于在pl/sql或中读写操作系统中的文件的。
2、资料你可以参照oracle联机文档的“Oracle8i Supplied PL/SQL Packages Reference”,oracle8i是a76936.pdf这个文件。
3、书你可以参照机械工业出版社的《oracle8i PL/SQL程序设计》,好像是这个书名,特别不错。

解决方案 »

  1.   

    To hrb_qiuyb(大森林):
    1。a76936.pdf是联机文档吗?
    2。“机械工业出版社的《oracle8i PL/SQL程序设计》”我在书店里翻过,里面讲到了utl_file吗?
      

  2.   

    1、没错a76936.pdf是联机文档吗,它在oracle8i的文档盘上呢,如果你没有这张盘,你也可以到http://otn.oracle.com/documentation/oracle8i.html这里down到,注册一个用户,是免费的,耐心点,以后会受益无穷的。
    2、《oracle8i PL/SQL程序设计》这本书,我刚刚翻了一次,确实没有找到utl_file的说明.
    3、不过你可以在www.google.com这个网站搜oracle utl_file这个串,搜之前把搜中文网页选中,就会搜出好多相关的文章,慢慢看吧。
      

  3.   

    联机文档中开始这样介绍:
    UTL_FILE 
    The UTL_FILE package lets your PL/SQL programs read and write operating system (OS) text files. It provides a restricted version of standard OS stream file input/output (I/O). The file I/O capabilities are similar to those of the standard operating system stream file I/O (OPEN, GET, PUT, CLOSE), with some limitations. For example, call the FOPEN function to return a file handle, which you then use in subsequent calls to GET_LINE or PUT to perform stream I/O to a file. When you are done performing I/O on the file, call FCLOSE to complete any output and to free any resources associated with the file. 后边还有一大堆东西,有两页,但介绍的还可以,不妨看看
      

  4.   

    推荐一本书:《Oracle9i PL/SQL 从入门到精通》    谈竹贤...
    中国水利水电出版社
    作者是自己编写的,不是抄的,很实用有对UTL_FILE很详细的介绍。
      

  5.   

    建议看<<Oracle9i PL/SQL 从入门到精通>>
      

  6.   

    Oracle8.05有,给你一个简单的例子
    /**************************************************************************
    name:sp_Write_log
    parameter:textContext in varchar2  日志内容
    create date:2002-12-19
    creater:chen jiping
    desc:写日志,把内容记到服务器指定目录下
    ****************************************************************************/
    procedure sp_Write_log(textContext varchar2)
    IS
      file_handle UTL_FILE.file_type;
      Write_content VARCHAR2(1024);
    begin
      file_handle:=UTL_FILE.FOPEN('\oracle\log','mylog.log','a');
      Write_content:=to_char(SYSDATE,'yyyy-mm-dd hh24:mi:ss')||'||'||textContext;
      IF UTL_FILE.IS_OPEN(file_handle) THEN
        UTL_FILE.PUT_LINE(file_handle,Write_content);
      END IF;
      UTL_FILE.Fclose(file_handle);
    EXCEPTION
       WHEN OTHERS THEN
       IF UTL_FILE.IS_OPEN(file_handle) THEN
         UTL_FILE.Fclose(file_handle);
       END IF;
    end sp_Write_log;
    ----------------------
    别忘了设置utl_dir参数
      

  7.   

    修改init.ora文件,设置utl_file_dir参数
    如utl_file_dir='/oradb/'
      

  8.   

    《Oracle 8i PL_SQL高级程序设计》第7章数 据库作业和文件输入输出
    有说明不过,我测试过,速度很慢,如果有比较大的文件I/O,最好不用
      

  9.   

    对了,我有《Oracle 8i PL_SQL高级程序设计》电子版,pdf的,要的话说一声 :)
    [email protected]
      

  10.   

    oracle子带文档已经够详细了
    对包中每一个函数都作了讲解