HOW TO GET the patch numbers from merged patch?

This is a step by step process how to get the patch number..


HOW TO GET the patch numbers from merged patch?

First Step

1.  Query the ad_applied_patches with the following the details:

select APPLIED_PATCH_ID,PATCH_NAME,MERGE_DATE from ad_applied_patches where PATCH_NAME like ‘%merg%’;

2.  Now using patch_id from 1st step, get driver_id from AD_PATCH_DRIVERS table.

select PATCH_DRIVER_ID,APPLIED_PATCH_ID,DRIVER_FILE_NAME,MERGED_DRIVER_FLAG from AD_PATCH_DRIVERS where APPLIED_PATCH_ID like ’524′;

3.  Now, using driver_id from 2nd step, get bug_id from AD_COMPRISING_PATCHES table.

select COMPRISING_PATCH_ID,BUG_ID from  AD_COMPRISING_PATCHES where PATCH_DRIVER_ID like ’562′;

4.  Now using Bug_id from the 3rd step, get details of patches applied as part of a merged patch from ad_pugs table.

select BUG_NUMBER,CREATION_DATE,BUG_ID from ad_bugs where BUG_ID in (’118552′,’118532′,’118522′,’118510′);



Shortcut in a single query
---------------------------------
select bug_number,creation_date,language from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches   where patch_driver_id in (select patch_driver_id from ad_patch_drivers where applied_patch_id in (select  applied_patch_id from ad_patch_drivers where driver_file_name like '%&MERGE_DRIVER_NAME%')));

Comments