How to check If a patch is applied in R12.2

How to check If a patch is applied in R12.2


In eBusiness Suite (EBS) 12.2.x you cannot query the AD_BUGS table to check if patches have been applied.The AD_BUGS table may have entries for patches that were applied but later the patching cycle was aborted (not really applied).


To check whether a patch is really applied use the AD_PATCH.IS_PATCH_APPLIED pl/sql function.Using this API is an alternative method for users without access to Oracle Applications Manager's "Patching and Utilities" feature to determine if a certain patch is applied.



Query to Find in single app tier or shared application tier Environment:
select ad_patch.is_patch_applied('R12',-1,20034256) from dual;

Expected results:
EXPLICIT = applied
NOT APPLIED = not applied / aborted


To check Multiple patches,Please use below query:

SELECT adb.bug_number,ad_patch.is_patch_applied('R12',-1, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in ('25820806','26720905',
'24591000','26482811','25828573','26400116','26720231','25994411');


To get output in human readable format:
set serveroutput on;
DECLARE
TYPE p_patch_array_type is varray(30) of varchar2(10);
p_patchlist p_patch_array_type;
p_patch_status varchar2(15);
p_appl_top_id number;
p_result varchar2(15);
p_instance varchar2(15);
procedure println(msg in varchar2)
is
begin
dbms_output.enable(1000000);
dbms_output.put_line(msg);
end;
BEGIN
p_patchlist:= p_patch_array_type('25820806','26720905','24591000','26482811','25828573','26400116','26720231','25994411','89989');
println('=============================');
for i in 1..p_patchlist.count
loop
p_patch_status := ad_patch.is_patch_applied('R12',-1,p_patchlist(i));
case p_patch_status
when 'EXPLICIT' then
p_result := 'APPLIED';
else
p_result := p_patch_status;
end case;
println('Patch ' || p_patchlist(i)|| ' - ' || ' - IS ' || p_result);
end loop;
println('.');
END;
/

Query to find patch information  for a specific node in a multinode environment (1045 is the APPL_TOP ID):
Syntax: select AD_PATCH.IS_PATCH_APPLIED(\'$release\',\'$appltop_id\',\'$patch_no\',\'$language\') from dual;

SELECT adb.bug_number,ad_patch.is_patch_applied('R12', 1045, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in (20034256);

APPL_TOP_ID -->you cat gen  from ad_appl_tops table.
appsdbahelp

17+ years of experience in Oracle Database, Oracle Cloud Infrastructure(OCI), Oracle EBS on Cloud, Oracle E-Business Suite, DevOps tools, Oracle WebLogic, Oracle Application Server, Oracle Access Manager and various Operating System flavors including Redhat Linux, UNIX (Solaris, HP-UX) and Windows. Expert in Oracle9i/10g/11g/12c/19c database administration, upgrade, configuration and tuning. Experience in Oracle E-Business Suite technological stack, including architecture, installation, configuration, maintenance, tuning, cloning and patching procedures. Expert in Oracle Cloud Infrastructure(OCI), Oracle EBS On Cloud and Oracle EBS Cloud Manager Experience with Oracle Cloud Solution and Expert of Oracle ERP/Oracle HCM Cloud deployment Experience in Terraform, JSON and chef cloud infrastructure automation framework Knowledge of ASM, Data Guard, Real Application Cluster, Exadata and Exalogic Knowledge of Oracle Enterprise Manager(OEM) Grid Control, Oracle WebLogic, Oracle Internet Directory, Oracle Access Manager and Apache Ability to analyze problem, develops solutions and bring program/project execution to completion.

Post a Comment

Previous Post Next Post