• 外部表查询时出现ORA-29913和ORA-29400错误



    create table t_ext_tab(id char(1),name char(6))
    organization external(
    type oracle_loader
    default directory scott_dir
    access parameters(
    records delimited by newline
    fields terminiated by '#')
    location ('ext.tab')
    );


    select * from t_ext_tab;
    *
    第 1 行出现错误:
    ORA-29913: 执行 ODCIEXTTABLEOPEN 调出时出错
    ORA-29400: 数据插件错误KUP-00554: error encountered while parsing access parameters

    KUP-01005: syntax error: found "identifier": expecting one of: "column, enclosed, exit, (, ltrim, lrtrim, ldrtrim, missing, notrim, optionally, rtrim,
     reject, terminated"
    KUP-01008: the bad identifier was: terminiated
    KUP-01007: at line 2 column 8
    ORA-06512: 在 "SYS.ORACLE_LOADER", line 19

     

    错误原因——从错误提示信息中可以看到是解析access parameters时出错了。仔细检查发现fields terminiated by '#'中的关键字terminiated写错了。正确的应该是"terminated"。

     

    外部表查询时的ORA-29913和ORA-29400错误,通常是由于其中关键字写错或定义的文件不存在。创建外部表时oracle不会验证其正确性。

     


     

  • 相关阅读:
    如何在IDEA中查看Gradle项目的所有依赖关系
    YUYV&YV12&mtk6763
    MTK-shot mode
    Thread中,join()方法
    高通平台常用缩写
    Android.mk用法详解
    HAL层编写规范
    MMU
    Linux设备驱动中断机制
    阻塞和非阻塞I/O
  • 原文地址:https://www.cnblogs.com/toughhou/p/3778801.html
Copyright © 2020-2023  润新知