HiveBrain v1.2.0
Get Started
← Back to all entries
debugMinor

ORA-29913 and ORA-30653 error selecting an external table

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
error30653oraselectingandexternal29913table

Problem

I created an external table using a .tbl file and now Im trying to select all rows from that table, using:

select * from users_load;


But Im getting this error:

ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reached


Do you know why this error is happening? This table have millions of rows, I dont know if can be because of this...

Solution

You can specify the number of rows allowed to be rejected before throwing an error, or you can specify UNLIMITED. I guess you specified a number, but your .tbl file contains rows that the database can't parse appropriately based on your definition.

If you want to ignore all malformed rows, you can simply change the limit to UNLIMITED:

alter table users_load reject limit unlimited;


create table example:

CREATE TABLE foo_load (
    employee_number CHAR(5)
) ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY ext_tab_dir
    ACCESS PARAMETERS (
        ...
    )
    LOCATION ('foo.txt')
)
REJECT LIMIT UNLIMITED; --Use limit, not limited

Code Snippets

alter table users_load reject limit unlimited;
CREATE TABLE foo_load (
    employee_number CHAR(5)
) ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY ext_tab_dir
    ACCESS PARAMETERS (
        ...
    )
    LOCATION ('foo.txt')
)
REJECT LIMIT UNLIMITED; --Use limit, not limited

Context

StackExchange Database Administrators Q#131324, answer score: 5

Revisions (0)

No revisions yet.