Oracle 9i ORA-04062 timestamp of package SYS DBMS_SNAPSHOT_UTL has been changed ORA-06512 at SYS DBM...

 

群里有个朋友问了个问题,Oracle 9i 的数据库,Job 执行失败,物化视图刷新报错。 错误信息如下:


ORA-04068: existing state of packages has been discarded
ORA-04062: of has been changed
ORA-04062: timestamp of package "SYS.DBMS_SNAPSHOT_UTL" has been changed
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
ORA-06512: at line 1

Oracle的解释如下:

Symptoms

Snapshot refresh of an 8.1.7 database from a 9.2.0.6 master
instance now fails for complete or fast refresh

exec dbms_snapshot.refresh('AS_GROUP','C') ;
BEGIN dbms_snapshot.refresh('AS_GROUP','C') ; END;
*
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04062: of has been changed
ORA-04062: timestamp of package "SYS.DBMS_SNAPSHOT_UTL" has been changed
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 617
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 674
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 654
ORA-06512: at line 1

Changes

The 9.2.0.6 database had been rebuilt from a 9.2.0.5 database. 

Cause

It looks likely that this issue is related to Bug:3017255.

It appears that is is possible for information to be flushed from the shared pool which cannot be reloaded correctly. By forcing a flush of the shared pool on both sides the problem can be worked around.

Solution

On both the master and the source sides issue

alter system flush shared_pool;

alter system flush shared_pool;

This should allow the refresh to start and complete successfully.

References

BUG:3017255 - Create Materiarized View Caused Ora-4068 And Ora-4062

对于Bug 3017255相关信息如下:

PROBLEM:
--------
- Creating two materialized views using same database link name (owner is
 different)
  causes ORA-4068,ORA-4062.
- refreshing the materialized views alternately cause ORA-4062.

DIAGNOSTIC ANALYSIS:
--------------------
 This only happens using same Database link name. (owner is differnet)
 If change one side's Database link name, error does not be caused.
 And if I execute 'alter system flush shared_pool' before create second
 materialized view or refresh materialized views, error does not be caused.

WORKAROUND:
-----------
- Don't use same database link name even if owner is different.
- Execute 'alter system flush shared_pool' before create materialized views.
- Execute 'alter system flush shared_pool' before refresh materialized views 

转载于:https://www.cnblogs.com/Hiberniane/archive/2010/04/23/2488691.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值