External Table With Null String Passed in OPTIONALLY ENCLOSED BY Clause Hangs (Doc ID 602279.1)

Last updated on JANUARY 16, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.8 to 12.1.0.2 [Release 9.2 to 12.1]
Information in this document applies to any platform.

Symptoms

You created an external table with a field termination clause of OPTIONALLY ENCLOSED BY '' that is accepted by the ORACLE_LOADER access driver:

create table test_ext
(
   field1 varchar2(10),
   field2 varchar2(10),
   field3 varchar2(10)
)
organization external
(
   type oracle_loader
   default directory ext
   access parameters
   (
      records delimited by newline
      fields terminated by ','
      optionally enclosed by ''
      missing field values are null
      (
         field1 char(10),
         field2 char(10),
         field3 char(10)
      )
   )
   location ( 'test.csv' )
);

-- write input file test.csv in directory EXT with this content:

"FIELD1","FIELD2","FIELD3"

When the external table is selected in a SQL*Plus session, then this will hang forever and consume CPU:

SQL> select * from test_ext;

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