?
Solved

External table problem

Posted on 2004-08-10
3
Medium Priority
?
1,604 Views
Last Modified: 2008-01-09
I created this external table, then tried a query for count.
What have I done wrong and how do I fix it?


SQL> @test2.sql

Table created.

SQL> select count(*) from temp_student;
select count(*) from temp_student
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing input commands
KUP-01006: error signalled during parse
KUP-00562: unknown escape sequence
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1


SQL> desc temp_student;
 Name                                      Null?    Type
 ----------------------------------------- -------- ---------------

 STU_KEY                                            NUMBER(10)
 NAME                                               VARCHAR2(32)
 STU_ID                                             CHAR(9)
 BIRTH_DATE                                         DATE
 SEX                                                CHAR(1)
.
.
.
.


0
Comment
Question by:xoxomos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:gmyers
ID: 11769804
Generally, you would have been better off posting the contents of your test2.sql script. It's hard to see the problem in a script you haven't shown.
Fortunately, in this case the error code has a note on metalink.

From Metalink :

    * symptom: SELECT from an EXTERNAL TABLE fails
    * symptom: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    * symptom: ORA-29400: data cartridge error
    * symptom: KUP-00554: error encountered while parsing access parameters
    * symptom: KUP-01006: error signalled during parse of access parameters
    * symptom: KUP-00562: unknown escape sequence
    * symptom: ORA-06512: at "SYS.ORACLE_LOADER", line 14
    * symptom: ORA-06512: at line 1
    * cause: The location of the badfile or logfile or discardfile contains the full path and therefore the \ character, considered as an escape character.

fix:

Do not enter in the ACCESS PARAMETERS clause, the full path of the file names
in the CREATE TABLE ORGANIZATION EXTERNAL statement.
0
 

Author Comment

by:xoxomos
ID: 11775697
CREATE TABLE temp_student
 (
   STU_KEY NUMBER(10) ,
   NAME   VARCHAR2(32 ),
   STU_ID CHAR(9 ),
   BIRTH_DATE DATE,
   SEX CHAR(1 )  
  )  
  ORGANIZATION EXTERNAL
     (TYPE oracle_loader
      DEFAULT DIRECTORY student_database
      ACCESS PARAMETERS
       (
        RECORDS DELIMITED BY newline
        BADFILE 'd:\oracle\migration\student_bad.txt'
        DISCARDFILE 'd:\oracle\migration\student_discard.txt'
        LOGFILE 'd:\oracle\migration\student_log.txt'
       )
   LOCATION ('d:\oracle\student_database\dwstubio')  
     );
0
 
LVL 6

Accepted Solution

by:
morphman earned 1000 total points
ID: 11778942
You are missing the actual access parameters for the fields (ie which position they are. See your other thread asking a similar question to which I have answered with an example of how the above query should work).
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question