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

情景: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博客 ” ,链接:http://blog.itpub.net/27042095/viewspace-743850/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27042095/viewspace-743850/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值