ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SQL*Loader-500: Unable to open file (v1x-access_log_20120916.dat)

SQL*Loader-500: Unable to open file (v1x-access_log_20120916.dat)

原创 Linux操作系统 作者:perfychi 时间:2012-09-18 02:23:10 0 删除 编辑
情景:SQL*Loader-500: Unable to open file (v1x-access_log_20120916.dat)

具体如下:
[oracle@yitai sqlldr]$ ls v1x-access_log_20120916*
v1x-access_log_20120916

[oracle@yitai sqlldr]$ sqlldr scott/oracle data=v1x-access_log_20120916   control=insert_log.ctl

SQL*Loader: Release 10.2.0.1.0 - Production on Tue Sep 18 02:22:09 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL*Loader-500: Unable to open file (v1x-access_log_20120916.dat)
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.


原因分析:(在文件名中有“.”时,sqlldr会寻找<文件>本身;  否则的话会默认寻找<文件>.dat,这时候会认为这个dat文件不存在)

解决方法(文件名中加点):
[oracle@yitai sqlldr]$ mv v1x-access_log_20120916  v1.x-access_log_20120916 
[oracle@yitai sqlldr]$ sqlldr scott/oracle data=v1.x-access_log_20120916   control=insert_log.ctl

SQL*Loader: Release 10.2.0.1.0 - Production on Tue Sep 18 02:25:01 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Commit point reached - logical record count 64
Commit point reached - logical record count 128
Commit point reached - logical record count 192
Commit point reached - logical record count 256
Commit point reached - logical record count 320
Commit point reached - logical record count 384

可以看到加点以后的文件名这时候就不报错了。所以为了避免这种无厘头的报错,最好在 sqlldr的文本文件命名中给他加后缀.dat, 避免特殊情况下找不到文件这种情形发生。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/27042095/viewspace-743850/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: AWK截取字符串
请登录后发表评论 登录
全部评论

注册时间:2012-06-06

  • 博文量
    484
  • 访问量
    2976213