Recently, because of the need to create a lot of similar data, so studied the Sqlloader this tool.
This tool is very helpful for a large number of data insertions.
Specific usage:
Frequently used keywords:
UserID-ORACLE Username/password
Control--Control file name
Log--Log file name
Bad-Bad file name
Data--Data file name
skip -- number of logical records to skip ( default 0)
load -- number of logical records to load ( all default )
errors -- number of errors to allow ( default 50)
How to use:
Generate Control File = Result.ctl
The structure of the table is stored in the control file. As follows:
LoadDatainfile'TEST. CSV' into TableTEST APPEND (PNAMECHARTerminated by ',', AgeCHARTerminated by ',', ADDRCHARTerminated by ',', PIDCHARTerminated by ',', PHONECHARTerminated bywhitespace)
Where infile represents the data store file, here is a comma delimiter file, into table represents the table to be inserted, APPEND is inserted by appending, other ways: Insert---> Default mode, but only if the table must be empty, Replace---> Delete old data, insert new,truncate----> Clear table First, then insert.
General error:
For example: column not found before logical record ends (using TRAILING nullcols)
Indicates the number of columns in your control file that do not match the number of columns in the data file , and has not specified < Span style= "FONT-SIZE:9PT;" >trailing nullcols parameter, which prevents some columns from being inserted, first check the control file and data file, and then consider whether you need to add < Span class= "Link_title" >trailing nullcols Parameters. (Added to the control file)
ORACLE Sqlldr Import