Sql 加载程序未通过 HTTP 请求完成

Sql Loader not finishing through HTTP request

我正在尝试通过 PHP 网站上的文件上传,通过 SQL Loader 将数据导入 oracle 数据库。当我 运行 通过浏览器导入时,最后一次提交丢失:

C:\inetpub\wwwroot\ESTEO\data>sqlldr 'db/pw' control=sqlLoaderFiles/file.ctl log='LoadResults.log'

SQL*Loader: Release 11.2.0.3.0 - Production on Mon Feb 11 16:51:26 2019

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Commit point reached - logical record count 26 Commit point reached - logical record count 52 Commit point reached - logical record count 78 Commit point reached - logical record count 104

当我 运行 通过命令行导入时,我得到:

C:\inetpub\wwwroot\ESTEO\data>sqlldr 'db/pw' control=sqlLoaderFiles/file.ctl log='LoadResults.log'

SQL*Loader: Release 11.2.0.3.0 - Production on Mon Feb 11 16:51:26 2019

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Commit point reached - logical record count 26 Commit point reached - logical record count 52 Commit point reached - logical record count 78 Commit point reached - logical record count 104 Commit point reached - logical record count 113

我的控制文件在这里:

    OPTIONS (

    skip=1,

    errors=100000,

    parallel=true

)

----------------------------------------------------------------------

LOAD DATA

   INFILE        'files/data.csv'

   BADFILE       'c:\temp\data_BAD.log'

   DISCARDFILE   'c:\temp\data_DISCARDED.log'

   TRUNCATE

   INTO TABLE     table

----------------------------------------------------------------------

Fields Terminated    by ","

Optionally Enclosed  by '"'

Trailing Nullcols

----------------------------------------------------------------------

   (columns)

我使用的命令在这里:

C:\inetpub\wwwroot\ESTEO\data\sqlLoaderFiles\run_sqlloader.bat db pw sqlLoaderFiles/file.ctl

批处理文件在这里:

sqlldr  '%1/%2@server'  control=%3   log='LoadResults.log'

我检查了 LoadResults.log,它显示正在加载 113 条记录,尽管实际上只有 104 条。

为什么最后一次提交没有通过 HTTP 请求完成?

我解决了这个问题。最后一条记录有我不需要的坏数据。删除它解决了问题。