Oracle10g Release 2: External Table With More Than 512 kb Fails To Load: ORA-29913 ORA-29400 KUP-04018 (Doc ID 351086.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version 10.2.0.1 and later
Oracle Server - Personal Edition - Version 10.2.0.1 and later
Oracle Server - Standard Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.

Symptoms

In Oracle10g Release2 (10.2.0.1.0), you have created an external table with fixed record length. Example:

connect / as sysdba
create or replace directory my_dir as 'D:\';
grant read, write on directory my_dir to public;
create user tc identified by tc default tablespace users;
alter user tc quota unlimited on users;
grant create session, create table to tc;
CONNECT tc/tc
CREATE TABLE testtab (
  nr  NUMBER,
  txt VARCHAR2(876))
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
  DEFAULT DIRECTORY MY_DIR
  ACCESS PARAMETERS 
  ( RECORDS FIXED 880
    BADFILE 'testtab.bad'
    LOGFILE 'testtab.log'
    FIELDS 
    ( nr  POSITION(1) INTEGER(4),
      txt POSITION(5) CHAR(876))
  )
  LOCATION ('testtab_large.dat')
);


A SELECT from this external table will fail with the following errors if the datafile (testtab_large.dat) is larger than 512 kb:

SELECT COUNT(*) FROM testtab;
SELECT COUNT(*) FROM testtab
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-29400: data cartridge error
KUP-04018: partial record at end of file D:\testtab_large.dat
ORA-06512: at "SYS.ORACLE_LOADER", line 52

Changes

You recently upgraded from Oracle10g Release 1 (10.1.0.x) to Oracle10g Release 2 (10.2.0.y).

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms