0

I am having problems loading a set of csv data with sql loader. i have a control file that contains the data and i have already created the target table in oracle 10g.

when i run this following command,

 C:\Users\lee\sqlloadertest> sqlldr scott/tiger@MYDB,CONTROL='Ad.ctl'

it produces

SQL*Loader: Release 10.2.0.3.0 - Production on Tue Sep 11 17:46:43 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Commit point reached - logical record count 52

when i check the Address table, it shows no rows created, meaning the table was not populated

Abiodun
  • 959
  • 6
  • 17
  • 38

2 Answers2

0

You can try running the sql loader with the log option and see the actual errors.

This is the complete format.

C:\Users\lee\sqlloadertest> sqlldr scott/tiger@MYDB CONTROL='Ad.ctl' log=ad.log bad=ad.bad

My guess is the records are all failing with a error, which is usually the case.

Rajesh Chamarthi
  • 18,568
  • 4
  • 40
  • 67
0

Try editing the ctl file-

LOAD DATA
INFILE 'Masterpiece.csv' BADFILE 'Masterpiece.bad' DISCARDFILE 'Masterpiece.dis'    
APPEND
INTO TABLE ADDRESS
fields terminated by "," optionally enclosed by '"'
(ID, LOCATORDESIGNATOR, LOCATORNAME, LOCATOR, THOROUGHFARE, ADDRESSAREA)

CSV file (Win formats) sometime contains " around the fields. Use the command below to run the ctl file.

sqlldr scott/tiger@MYDB CONTROL='Ad.ctl' LOG='Ad.log'

Check the bad and dis files for errors and discarded records.

Anjan Biswas
  • 7,746
  • 5
  • 47
  • 77