ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-29913、ORA-30653错误

ORA-29913、ORA-30653错误

原创 Linux操作系统 作者:zzslinux 时间:2013-10-14 13:46:18 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2013-07-09

  • 博文量
    6
  • 访问量
    21455