Oracle软件包突然失效

时间:2013-04-30 13:55:44

标签: oracle compilation package

如何找出为什么我的所有Oracle数据库架构包突然变为无效状态? 当我重新编译它时,无效对象编译成功。 我创建了触发器“在ddl之前”,但它没有帮助我。 此外,我从user_errors查询以查看问题所在,但该视图中没有错误。 有什么建议吗?

这是我的表审核和触发器:

     create table invalidations (
  operation           varchar2(30),
  invalidating_object varchar2(30),
  invalidating_owner  varchar2(30),
  invalidated_object  varchar2(30),
  invalidated_owner   varchar2(30),
  invalidation_date   date,
  ipaddr varchar2(30),
  host varchar2(30),
  curruser varchar2(30),
  currschema varchar2(30),
  fgjob number,
  bgjob number
);

create or replace trigger befddl_trg
before ddl
on schema
declare
begin
  insert into invalidations
  select ora_sysevent, ora_dict_obj_name, ora_dict_obj_owner, d.name, d.owner, sysdate,
  SYS_CONTEXT('USERENV', 'IP_ADDRESS', 15) 
  ,SYS_CONTEXT('USERENV', 'HOST', 16) 
  ,SYS_CONTEXT('USERENV', 'CURRENT_USER', 8) 
  ,SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA', 8) 
  ,SYS_CONTEXT('USERENV', 'FG_JOB_ID', 4) 
  ,SYS_CONTEXT('USERENV', 'BG_JOB_ID', 4) 
  from   all_dependencies d 
  where  referenced_name = ora_dict_obj_name 
  and    referenced_owner = ora_dict_obj_owner;
end befddl_trg;

0 个答案:

没有答案