select外部表报错ora-29913,ora-29400 求助

各位好,创建外部表操作如下,请帮忙看看是哪里的问题。

1.创建目录时路径里面没有空格

[oracle@db1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Dec 13 14:40:01 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

SQL> drop DIRECTORY dir_bdump;

Directory dropped.

SQL> create or replace directory dir_bdump as '/home/oracle';

grant read,write on directory dir_bdump to ydqxn;

Directory created.

SQL>

Grant succeeded.

SQL>

SQL>

SQL>

SQL> conn ydqxn/ydqxn

Connected.

SQL> drop table org_ext_dz;

Table dropped.

SQL> create table org_ext_dz (

2    ID            NUMBER,

3    USER_MOBILE   VARCHAR2(20),

4    SERVICE_ID    NUMBER,

5    USER_STATUS   NUMBER,

6    USER_AREA     VARCHAR2(20),

7    FORECAST_AREA VARCHAR2(20),

8    FORECAST_TIME DATE,

9    FORECAST_TYPE NUMBER,

10    SAVETIME      DATE,

11    USER_ORIGIN   NUMBER

12   )

13    organization external (

14    type oracle_loader

15    default directory dir_bdump

16    access parameters (

17    records delimited by newline

18    FIELDS TERMINATED BY '      '

19    --nobadfile

20    --nodiscardfile

21    --nologfile

22    )

23    location('t_user_mobile_dz.txt')

24    )

25    reject limit unlimited;

Table created.

SQL> select count(*) from org_ext_dz;

select count(*) from org_ext_dz

*

ERROR at line 1:

ORA-29913: error in executing ODCIEXTTABLEOPEN callout

ORA-29400: data cartridge error

KUP-00554: error encountered while parsing access parameters

KUP-01005: syntax error: found "minussign": expecting one of: "column,

enclosed, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim,

reject"

KUP-01007: at line 3 column 3

ORA-06512: at "SYS.ORACLE_LOADER", line 19

SQL>

------解决方案--------------------

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐