正德厚生,臻于至善

ad_bugs和ad_applied_patches的区别

How to check if a patch has been applyed with adpatch (Doc ID 472820.1)
set lines 200 pages 50000
SELECT DISTINCT RPAD(a.bug_number,11)||RPAD(e.patch_name,11)|| RPAD(TRUNC(c.end_date),12)|| RPAD(b.applied_flag,4)
FROM
ad_bugs a,
ad_patch_run_bugs b,
ad_patch_runs c,
ad_patch_drivers d ,
ad_applied_patches e
WHERE a.bug_id = b.bug_id AND
b.patch_run_id = c.patch_run_id AND
c.patch_driver_id = d.patch_driver_id AND
d.applied_patch_id = e.applied_patch_id AND
a.bug_number LIKE &patch_number
ORDER BY 1 DESC

set lines 200 pages 50000
SELECT DISTINCT RPAD(a.bug_number,11)||RPAD(e.patch_name,11)|| to_char(c.end_date, 'YYYY-MM-DD HH24:MI:SS')||RPAD(b.applied_flag,4)
FROM
ad_bugs a,
ad_patch_run_bugs b,
ad_patch_runs c,
ad_patch_drivers d ,
ad_applied_patches e
WHERE a.bug_id = b.bug_id AND
b.patch_run_id = c.patch_run_id AND
c.patch_driver_id = d.patch_driver_id AND
d.applied_patch_id = e.applied_patch_id AND
a.bug_number LIKE &patch_number
ORDER BY 1 DESC

转一段网友回复:

Hi there,

It is just a quick idea. I have suspicious that ad_applied_patches
contains information about patches that you applied on the system,
ad_bugs has information about all bugs and patches that have been
included in the patches you applied.

For example you apply merged patch merge123 it contains 5 patches
10001 10002 10003 …
ad_applied_patches – will have one record about merge123
ad_bugs – 5 records

Another example: you apply maintenance patch which includes 51 other
patches. In that case
ad_applied_patches – will have one record about maintenance patch
ad_bugs – 51 + 1

I hope my thought is clear for you.

PS Anyway I use ad_bugs table in order to find out do I have one or
another patch to apply.

Jurijs

—————————–

AD_BUGS holds information about the various Oracle Applications bugs whose  fixes have been applied (ie. patched) in the Oracle Applications installation.
AD_APPLIED_PATCHES holds information about the “distinct” Oracle  Applications patches that have been applied. If 2 patches happen to have the  same name but are different in content (eg. “merged” patches), then they are  considered distinct and this table will therefore hold 2 records.

 
ad_applied_patches contains information about patches that you applied on the system,
ad_bugs has information about all bugs and patches that have been included in the patches you applied.
—————————–

select count(bug_number) from apps.ad_bugs; bug_number 对应 patch号

ad_applied_patches是你自己adpatch打的那些(包括merge),但是安装的时候已经包含的patch,这个表不会记录,

所以如果要查询某个patch是否已经applied,还是ad_bugs。

select b.bug_number, to_char(b.LAST_UPDATE_DATE, 'YYYY-MM-DD HH24:MI:SS') Last_update from apps.ad_bugs b where bug_number='&a';
Filename [adpatch.log] : 10257769_EN_adpatch.log(指定adpatch输出日志的名字,一般放在$APPL_TOP/admin/<SID>/log下,默认名为adpatch.log,不过最好改成补丁编号+语言.log)

set lines 200 pages 50000
select distinct b.bug_number, to_char(b.LAST_UPDATE_DATE, 'YYYY-MM-DD') Last_update from apps.ad_bugs b where to_char(b.LAST_UPDATE_DATE, 'YYYY-MM-DD')>'2010-08-20' order by 2;
赞(0) 打赏
未经允许不得转载:徐万新之路 » ad_bugs和ad_applied_patches的区别

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册