control file  的内容更新一下
========================================================LOAD DATA
INFILE 'tmp.txt' "RECSIZE 51 BUFFERS 100"
BADFILE 'bad.txt'
APPEND
INTO TABLE user.tb
FIELDS TERMINATED BY '¦'
(t1 CHAR
,t2 VARCHAR)
======================================================

解决方案 »

  1.   

    我的测试(根据你的条件,不过改了一下);
    tmp.txt1|desc 1|
    2|desc 2|control.txtLOAD DATA
    INFILE 'tmp.txt' 
    BADFILE 'bad.txt'
    APPEND
    INTO TABLE sa.TmpTB
    FIELDS TERMINATED BY '|'
    (col1 CHAR
    ,col2 VARCHAR)
    D:\ORANT_DB\CONSOLE>sqlldr userid=user/password control=control.txt bad=bad.txtSQL*Loader: Release 8.1.7.0.0 - Production on Tue Jan 29 01:38:05 2002(c) Copyright 2000 Oracle Corporation.  All rights reserved.达到提交点,逻辑记录计数1
    达到提交点,逻辑记录计数2
    D:\ORANT_DB\CONSOLE>============================================
    SQL> create table TmpTb
      2  (col1 varchar2(10),
      3  col2 varchar2(20)
      4  );表已创建。SQL> select * from tmptb;未选定行SQL> /COL1       COL2
    ---------- --------------------
    1          sc 1|
    2          sc 2|
    ============================================
      

  2.   

    那我的control file呢?是不是有问题,我觉得没有。我执行後就像死循环一样。sqlldr80都退不出来。
      

  3.   

    "RECSIZE 51 BUFFERS 100"
    我不知道 这是什么意思?我一加上去就说:
    D:\ORANT_DB\CONSOLE>sqlldr userid=user/password control=control.txt bad=bad.txtSQL*Loader: Release 8.1.7.0.0 - Production on Tue Jan 29 09:42:13 2002(c) Copyright 2000 Oracle Corporation.  All rights reserved.SQL*Loader-500:  无法打开文件 (tmp.txt)
    SQL*Loader-555:  未被识别的处理选项
      

  4.   

    我查了oracle的手册说是buffer
    recsize 是 记录的大小,buffers 是一次装几条记录
    那么buffer 最后的值应该=recsize * buffers
    可能你的8.1.7不支持这个参数了。我也把它下了试一试。rwq_(风云浪子) 是不是一夜没睡 ^_^
      

  5.   

    control filename : test.ctl
    contents:LOAD DATA
    INFILE 'tmp.txt' 
    BADFILE 'bad.txt'
    APPEND
    INTO TABLE LEP.TB_AGENT_TYPE 
    FIELDS TERMINATED BY '¦'
    (fd1 CHAR
    ,fd2 VARCHAR)
      

  6.   

    rwq_(风云浪子) :我把buffer 去掉了不过.....D:\orant\BIN>sqlldr80 control=test.ctl userid=user/password@server bad=bad.txtSQL*Loader: Release 8.0.5.0.0 - Production on 星期二 1月 29 10:22:35 2002(c) Copyright 1998 Oracle Corporation.  All rights reserved.SQL*Loader-524: 在 datafile (tmp.txt) 结尾发现部分记录D:\orant\BIN>sqlplus user/password@serverSQL*Plus: Release 8.0.5.0.0 - Production on 星期二 1月 29 10:27:29 2002(c) Copyright 1998 Oracle Corporation.  All rights reserved.
    连接到:
    Oracle8 Release 8.0.5.0.0 - Production
    PL/SQL Release 8.0.5.0.0 - ProductionSQL>select * from tb;t1 t2
    -- ---------------------------------
    1  desc
    SQL> quit;
    就是说只有一条被装入
      

  7.   

    RECSIZE 51 BUFFERS 100指定了你要倒入的数据文件包含51个字节的纪录,用100个异步I/O读取,实际上你的文件不是51个字节的格式,所以打不开,去掉这个参数就可 一了
      

  8.   

    yarao(龙江老三)那是因为你的数据文件部队
      

  9.   

    RECSIZE is the size of a fixed-length record, and BUFFERS is the number of
    buffers to use for asynchronous I/O.
      

  10.   

    flowerofwind(现实很残酷),呵呵对是我没有仔细。对,你对。
    但是我的数据文件就是
    1,desc,(\n\r 是回车换行)
    2,desc,
    难道不对(我把分隔符改为逗号了,csdn显示不出我原来那个分隔符,control file 也改了 )
      

  11.   

    1,desc
    2,desc你把数据文件改为上面的试试!(你上面的数据文件有一个全角的引号)
    还有,我找了半天的资料,都没有找到在SQLLDR中的"RECSIZE 51 BUFFERS 100"的说明?不知那个文档有这个说明的,如果那位兄弟有的,能发我一份![email protected]
      

  12.   

    to rwq_(风云浪子) 
    8i的utility user guide有
    RECSIZE is the size of a fixed-length record, and BUFFERS is the number of
    buffers to use for asynchronous I/O.
    To declare a file named MYDATA.DAT as a file that contains 80-byte records and
    instruct SQL*Loader to use 8 I/O buffers, you would use the following control file
    entry:
    INFILE ’mydata.dat’ "RECSIZE 80 BUFFERS 8"
    Note: This example uses the recommended convention of single quotation
    s for filenames and double quotation s for everything else.
      

  13.   

    但是我把每行最后一个逗号都去掉了,还是没有用。
    我用的是"," 不是","虽然我在csdn上用了","。问题还是结尾发现部分记录,55555555555
    SQL*Loader-524: 在 datafile (tmp.txt) 结尾发现部分记录