Home > database >  SQLLDR insert data to the oracle, the data can't fully inserted
SQLLDR insert data to the oracle, the data can't fully inserted

Time:09-20

Now there is a demand, that is, to read data from TXT file (millions) and quickly inserted into the oracle, so want to use SQLLDR, problem is: through the Windows command line when performing SQLLDR end of the normal operation, the log showed that all the load data success, no error, and there is no bad generated file, but the actual number is inserted into the records in the database is always less than the original data, such as original data 100000, put in storage after only 99977, 1792327, the original data after insert only 1792208,
Thought for a long time and I don't know where is the reason, please met predecessors taught,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
(1) SQLLDR command: SQLLDR userid=test/test123 @ CCS control="D:/aa. CTL errors=100000 log=" D:/aa. The log
(2) aa. CTL:
The load data
Infile 'D:/bb. TXT'
Badfile 'D:/bb. Bad'
Discardfile 'D:/bb. DSC'
Append into table a001
Fields terminated by '|'
The trailing nullcols
(
A001_id,
A001_type,
A001_datetime,
A001_jrnl,
A001_mid,
A001_amount,
A001_cardno,
A001_summary,
A001_result,
A001_temp1,
A001_temp2
)
(3) the raw data format example: 00 | | 20170603260183 | 0 woen2afe21faw234aegg | 927986916 | | 86916491824686759 | 29

CodePudding user response:

Compare the raw data, see missed what? Look at what's the problem with these data

CodePudding user response:

Use dichotomy, half delete data, look at the lines, what is the difference between,

This situation should not happen,

CodePudding user response:

If there is a blank line?

CodePudding user response:

Watch isn't set up the primary key, a text file for duplicate data, also see the import logs

CodePudding user response:

The errors is zero, an error is not that separator has a problem

CodePudding user response:

Agrees with the assessment of # 5, the estimate is the issue of the separator, lead to a few lines of the merger to line 1, and you can see the first field in the database have abnormal content length, to locate to the text about content, examination content,
  • Related