Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

External table problem

Posted on 2004-08-10
3
Medium Priority
?
1,623 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

636 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