3

I am trying to upload data to a table using sql ldr-

sqlldr userid=aa2012/uaxiqdz@ADB control=simple.ctl

simple.ctl:-

LOAD DATA
INFILE '../data/simple.csv'
BADFILE '../data/simple.bad'
DISCARDFILE '../data/simple.dsc'
INTO TABLE SIMPLE_TAB
replace
fields terminated by ',' optionally enclosed by '"'
(
  ID INTEGER 

EXTERNAL, 
  NAME CHAR(32)
)

simple.csv has two columns: 1st-number 2nd Name.

create table Simple_Tab (
  id    number primary key,
  name  varchar2(32)
)

But I get the following error -

SQL*Loader: Release 10.2.0.1.0 - Production on Sat Dec 4 22:43:55 2010

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

SQL*Loader-941: Error during describe of table SIMPLE_TAB ORA-04043: object SIMPLE_TAB does not exist

I tried -

  1. Carefully choosing the filepaths where i store the files.
  2. Deleting and recreating the table SIMPLE_TAB
  3. Carefully using upper case in all the commands

but none helped.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Radz
  • 543
  • 2
  • 10
  • 22
  • If you post code or XML, **please** highlight those lines in the text editor and click on the "code" button (101 010) on the editor toolbar to nicely format and syntax highlight it! – marc_s Dec 05 '10 at 08:40

3 Answers3

2

You were probably connected to a different database (or user) when you ran the create table statement.

What does select user from dual; show you when run in SQL*Plus (e.g. right after/before running the create table)

  • I can see the table added on the left panel of the sqldeveloper. So I am pretty sure that the table is created. – Radz Dec 06 '10 at 00:15
  • And you are sure that SQLDeveloper connects to **exactly** the same database and user as your connection for SQL*Loader? –  Dec 06 '10 at 08:07
0

One more reason for this could happen when you do not qualify the table name in the control file with the schema name.

So, if your table is in schema scott and your table name is not qualified by this, then Sqlldr will complain when you use a login user other than scott.

AppleGrew
  • 9,302
  • 24
  • 80
  • 124
0

Had the exact same issue today. In my case, it was that I thought the table name was tblname, when in fact, it was "tblname" (with quotes).

I also work with SQL Developer, and the Schema Browser showed that the table name was tblname, which fooled me. Only when I used the drag-and-drop utility to create a select command from this table, did I see the table name actually contained quotes.

drapkin11
  • 1,205
  • 2
  • 12
  • 24