0
votes

I am trying to import data through SQL Loader into an oracle database through a file upload on a PHP website. When I run the import through the browser, the last commit is missing:

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

When I run the import through the command line I get:

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

My control file is here:

    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)

The command I am using is here:

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

The batch file is here:

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

I checked LoadResults.log and it showed 113 records being loaded even though only 104 actually were.

Why is the last commit not finishing through the HTTP request?

1

1 Answers

0
votes

I solved the issue. The last record had bad data I didn't need anyway. Removing it solved the issue.