ORA-29913、ORA-30653错误

ERROR:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reached

创建外部表:
create or replace directory data_dir
as
'/u01/app/oracle/diag/rdbms/fuiou/fuiou/trace/'
/


create table alert_log
(
text_line varchar2(255)
)
organization external
(
        type oracle_loader
        default directory data_dir
        access parameters
        (
                records delimited by newline
                fields
        )
        location
        (
                'alert_fuiou.log'
        )
)
/



alter table alert_log reject limit unlimited;       
--告诉oracle, alert_log这个外部表行没有限制,如果不执行这条语句,下面查询的时候就会出以下错误:
ERROR:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reached



select to_char(last_time,'yyyy-mon-dd hh24:mi') shutdown,
        to_char(start_time,'yyyy-mon-dd hh24:mi') startup,
        round((start_time - last_time)*24*60,2) mins_down,
        round((last_time - lag(start_time) over (order by R)),2) days_up,
        case when (lead(R) over (order by R) is null)
                then round((sysdate-start_time),2)
        end days_still_up
from(
select R,
        to_date(last_time, 'Dy Mon DD HH24:MI:SS YYYY') last_time,
        to_date(start_time, 'Dy Mon DD HH24:MI:SS YYYY') start_time
from(
select R,
        text_line,
        lag(text_line,1) over (order by R) start_time,
        lag(text_line,2) over (order by R) last_time
from(
select rownum r, text_line
from alert_log
        where text_line like '___ ___ __ __:__:__ 20__'
        or text_line like 'Starting ORACLE instance %'
)
)
        where text_line like 'Starting ORACLE instance %'
)
/


查看警告日志

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

转载于:http://blog.itpub.net/26853563/viewspace-774324/

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值