[转载]—Health Check Reports Problem: Dependency$ p_timestamp mismatch for VALID objects (文档 ID 781959.1)
2019-06-25 20:46 潇湘隐者 阅读(744) 评论(0) 编辑 收藏 举报Health Check Reports Problem: Dependency$ p_timestamp mismatch for VALID objects (文档 ID 781959.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.2.0.5 to 12.1.0.2 [Release 9.2 to 12.1]
Information in this document applies to any platform.
***Checked for relevance on 18-Jan-2014***
Health check output reports
Problem: Dependency$ p_timestamp mismatch for VALID objects?
May be Ok - needs checking, (Warning: [W], Error: [E]).
[W] - P_OBJ#=37817 D_OBJ#=38416
[W] - P_OBJ#=38014 D_OBJ#=38605
[W] - P_OBJ#=38020 D_OBJ#=38611
[W] - P_OBJ#=38043 D_OBJ#=38634
[W] - P_OBJ#=38061 D_OBJ#=38652
[W] - P_OBJ#=38064 D_OBJ#=38655
[W] - P_OBJ#=38087 D_OBJ#=38678
[W] - P_OBJ#=38090 D_OBJ#=38681
.
This issue is caused due to mismatch in timestamp information with the dependent objects.
It may not be an actual dictionary corruption.
This can cause problems during upgrade and PLSQL validation
Please Note : Its advisable to run the script during non business hours or when the load in the database is less.
The Solution is applicable only for D_TYPE with value 5(synonyms) returned from the below query
select
do.obj# d_obj,do.name d_name, do.type# d_type,
po.obj# p_obj,po.name p_name,
to_char(p_timestamp,'DD-MON-YYYY HH24:MI:SS') "P_Timestamp",
to_char(po.stime ,'DD-MON-YYYY HH24:MI:SS') "STIME",
decode(sign(po.stime-p_timestamp),0,'SAME','*DIFFER*') X
from sys.obj$ do, sys.dependency$ d, sys.obj$ po
where P_OBJ#=po.obj#(+)
and D_OBJ#=do.obj#
and do.status=1 /*dependent is valid*/
and po.status=1 /*parent is valid*/
and po.stime!=p_timestamp /*parent timestamp not match*/
order by 2,1;
Check if the d_type is reported as 5.
Compile the synonyms using the following script
set pagesize 10000
set trimspool on
set head off
set echo off
spool /tmp/compiling.lst
select 'alter public synonym "'||synonym_name||'" compile;'
from dba_synonyms where owner='PUBLIC';
select 'alter synonym "'||owner||'"."'||synonym_name||'" compile;'
from dba_synonyms where owner!='PUBLIC';
SQL> Spool off
Now run this spooled file
SQL> Spool /tmp/compiling_result.lst
SQL>@/tmp/compiling.lst
SQL> Spool off
Now re-run the following query and check if the number of objects have reduced as compared to output
select
do.obj# d_obj,do.name d_name, do.type# d_type,
po.obj# p_obj,po.name p_name,
to_char(p_timestamp,'DD-MON-YYYY HH24:MI:SS') "P_Timestamp",
to_char(po.stime ,'DD-MON-YYYY HH24:MI:SS') "STIME",
decode(sign(po.stime-p_timestamp),0,'SAME','*DIFFER*') X
from sys.obj$ do, sys.dependency$ d, sys.obj$ po
where P_OBJ#=po.obj#(+)
and D_OBJ#=do.obj#
and do.status=1 /*dependent is valid*/
and po.status=1 /*parent is valid*/
and po.stime!=p_timestamp /*parent timestamp not match*/
order by 2,1;

【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
2018-06-25 ORACLE中Scalar subquery Caching的hash table大小测试浅析
2013-06-25 MS SQL 2008 发布订阅配置错误总结