Solved

External table problem

Posted on 2004-08-10
3
1,569 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
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 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now