开发者

SQLLDR Error: Object does not exist while trying to insert data to a database

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 (
  开发者_JS百科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.


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)


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜