Sunday, July 14, 2013

Forms Launching directly on EBS login for specific user

Issue:
If this happens for a single user this may be the result of the fact the user defined this function as the Start Page in the Preferences link.

Solution:
Verify the profile option "Applications Start Page" being set at user level for the offending user. If a value is set a specific function has been set which is automatically called after the user logs
Remove the value for the profile at user level and retest the issue.

Or

If the above solution does not work, clear the cache as below.
Functional Administrator > Core Services > Caching Framework > Global Configuration > Clear all caches (button) to clear the Java Object Caches which cache Responsibility values.

See also Note:729375.1 About "Applications Start Page" profile option for more information on this profile


Thursday, July 11, 2013

adcvm.sh[211]: AIX: unknown test operator in 11i

Hi,
This issue is caused in AIX 212 systems only

Below is the fix.

Comment out the below lines in $AD_TOP/bin/adcvm.sh file.

if ((test "$pltform" = "Solaris") ||(test "$pltform" = "Intel_Solaris")); then

echo "Passed platform test!"

if test "$tier" = "database"; then

echo " Passed tier test!"

if test "$dbversionnum" -ge "112" ; then

echo " Passed DB version test!"

ADJREOPTS="$ADJREOPTS -d64";

fi

fi

fi


Tuesday, July 9, 2013

Helpful Scripts for 11i and R12

To find details(including appln user name) of a lock on given object or all objects locked in database

SELECT c.owner
,c.object_name
,c.object_type
,fu.user_name locking_fnd_user_name
,fl.start_time locking_fnd_user_login_time
,vs.module
,vs.machine
,vs.osuser
,vlocked.oracle_username
,vs.sid
,vp.pid
,vp.spid AS os_process
,vs.serial#
,vs.status
,vs.saddr
,vs.audsid
,vs.process
FROM fnd_logins fl
,fnd_user fu
,v$locked_object vlocked
,v$process vp
,v$session vs
,dba_objects c
WHERE vs.sid = vlocked.session_id
AND vlocked.object_id = c.object_id
AND vs.paddr = vp.addr
AND vp.spid = fl.process_spid(+)
AND vp.pid = fl.pid(+)
AND fl.user_id = fu.user_id(+)
AND c.object_name LIKE '%' || upper('&tab_name_leaveblank4all') || '%'
AND nvl(vs.status
,'XX') != 'KILLED';

To fine locks on table query
v$locked_object, some other tables dba_objecs, tab , dba-tables, v$session, v$process, v$loc, dba_locks ,dba-waiters
select OBJECT_NAME,OBJECT_ID,OBJECT_TYPE from dba_objects where OBJECT_NAME='FA_MASS_ADDITIONS';
select * from v$locked_object where OBJECT_ID=79706; if this return any rows then lock is present on that object
rdbms/admin/utllockt.sql to get lock tree
Also check in v$access to see if any session is holding the opbject
select SESSION_ID,OBJECT_ID,LOCKED_MODE,PROCESS from v$locked_object where OBJECT_ID=79706;
select SESSION_ID,OBJECT_ID,LOCKED_MODE,PROCESS,ORACLE_USERNAME,OS_USER_NAME from v$locked_object where OBJECT_ID=79706;
select LOCKWAIT,STATUS,SCHEMANAME,OSUSER from v$session where SID=105;

query to find a lock
select sid,username,serial#,status from v$session where sid in
(select session_id from dba_locks where blocking_others='Blocking');


To find locks on a module
SELECT a.object_id, a.session_id, SUBSTR(b.object_name, 1, 40)
FROM v$locked_object a, dba_objects b
WHERE a.object_id = b.object_id
AND b.owner IN ('&M')
ORDER BY a.session_id;

SELECT a.object_id, a.session_id, substr(b.object_name, 1, 40),owner,status
FROM v$locked_object a, dba_objects b WHERE a.object_id = b.object_id AND b.owner in ('&module');


To find and terminate all the sessions held by an object
SQL> select sid, serial#, status, module from v$session where sid in (select distinct sid from v$access where object = 'XXART_RCV_TRANSACTION_PK');

SID SERIAL# STATUS MODULE
---------- ---------- -------- ------------------------------------------------
3434 53145 ACTIVE XXPOURCVW
3854 9742 ACTIVE XXPOURCVW
3949 6531 INACTIVE XXPOURCVW
3955 14566 INACTIVE XXPOURCVW
3991 50125 INACTIVE XXPOURCVW
4143 58949 ACTIVE XXPOURCVW
4294 39052 ACTIVE XXPOURCVW
4347 19960 INACTIVE XXPOURCVW
4770 65507 INACTIVE XXPOURCVW
4841 59140 INACTIVE XXPOURCVW
4895 3632 INACTIVE XXPOURCVW"


Some times JVM processes keeps hogging on the db server, to check who all the users connected from that jvm prcoess we can do the below to track those users along with the action they are doing and report to client.

set linesize 1000
set pagesize 1000
column module format a40
column program format a20
column address format 9
column appsuser format a8
column username format a4
column SID format 99999
column sql_text format a80
column user_name format a15
col action for a10
SELECT s.sid,s.serial#,p.pid,p.spid,s.status,s.action,s.last_call_et/60 wait_mins,f.user_name,s.module
FROM gv$process p, gv$session s,fnd_signon_audit_view f
WHERE p.inst_id = s.inst_id 
and p.addr = s.paddr 
and f.pid=p.pid 
and s.process = '12649'
-- and s.sid = 9606;
/



To find forms session details which are existing from several hours"select b.sid ""sid"", b.serial# ""ser#"", c.spid ""OS Prc."", b.status, b.username, b.module, b.action, to_char(b.logon_time, 'DD-MON-YY HH:MI AM') ""Logon Time""
from v$session b, v$process c
where b.paddr = c.addr
and b.action like 'FRM%'
and b.logon_time < sysdate - (1/2) --logged in over 16 hours ago
order by logon_time asc
/"

select b.sid "sid", b.serial# "ser#", c.spid "OS Prc.", a.event, b.status, b.username, b.module, b.action,
to_char(b.logon_time, 'DD-MON-YY HH:MI AM') "Logon Time"
from v$session_wait a, v$session b, v$process c
where a.sid = b.sid
and b.paddr = c.addr
and b.action like 'FRM%'
and b.logon_time < (sysdate - (1/4)) -- logged in over 6 hours ago
order by logon_time asc

To find number of sessions held by application users
select count(*), fu.user_name
from v$process p,v$session s, apps.fnd_logins f, apps.fnd_user fu where p.addr = s.paddr
and f.spid (+) = s.process
and fu.user_id (+) = f.user_id
and f.end_time(+) is null
and fu.user_name IN ('VLEE', 'TNGUYEN', 'DBREIG' ) group by fu.user_name 
/"

To Kill all sessions of an user ( eg: DBREIG) 

select 'alter system kill session ' || '''' ||sid || ',' || s.serial# || '''' || ';'
from v$process p,v$session s, apps.fnd_logins f, apps.fnd_user fu
where p.addr = s.paddr
and f.spid (+) = s.process
and fu.user_id (+) = f.user_id
and f.end_time(+) is null
and fu.user_name='DBREIG'
order by f.start_time
/

TO get session informations of an application user

set linesize 1000 pagesize 1000 feedback off

column module format a15

column program format a20

column address format 9

column appsuser format a8

column username format a4

column SID format a10

column sql_text format a80

column user_name format a30

column "Time (m)" for a9

SELECT s.sid||','||s.serial# sid,p.pid,p.spid,s.status,s.action,f.time "Time (m)",u.email_address user_name

FROM v$process p, v$session s,fnd_signon_audit_view f, fnd_user u

WHERE p.addr = s.paddr

and f.pid=p.pid 

and f.user_id = u.user_id

and u.user_name like '&Application_User%';

To find sql test from sid
"select sql_text from v$sqlarea where address in (select sql_address from v$session where sid =928); 

SQL_TEXT 
---------------------------------------------------------------------------------------------------------------------------------- 
begin DP.DATA_LOAD.EP_LOAD_SALES; end; 

SQL> select SID,EVENT,p1,p2 from v$session_wait where sid=928; 

SID EVENT P1 P2 
---------- ---------------------------------------------------------------- ---------- ---------- 
928 db file sequential read 53 223359 


To get Top 5 time-consuming requets
*****************************

select f1.conc_prog,f1.req_id,f1.oracle_id from
(select f.concurrent_program conc_prog,f.request_id req_id,f.oracle_process_id oracle_id from
(select t.user_concurrent_program_name concurrent_program,
r.request_id request_id,r.oracle_process_id oracle_process_id
from fnd_concurrent_requests r,
fnd_concurrent_processes p,
fnd_concurrent_programs_tl t
where r.controlling_manager = p.concurrent_process_id
and r.program_application_id = t.application_id
and r.concurrent_program_id = t.concurrent_program_id
and to_char(sysdate-r.actual_start_date)*1440 > 60
and r.Phase_Code = 'R' and r.Status_Code = 'R'
order by to_char(sysdate-r.actual_start_date)*1440 ) f
where rownum < 6) f1

To get sqls of Top 5 time-consuming concurrent requests
***********************************************

set pages 5000
set lines 132
break on cy
spoo /tmp/cy
select f1.conc_prog||' '||f1.req_id||' '||f1.oracle_id cy,st.sql_text
FROM
(select f.concurrent_program conc_prog,f.request_id req_id,f.oracle_process_id oracle_id from
(select t.user_concurrent_program_name concurrent_program,
r.request_id request_id,r.oracle_process_id oracle_process_id
from fnd_concurrent_requests r,
fnd_concurrent_processes p,
fnd_concurrent_programs_tl t
where r.controlling_manager = p.concurrent_process_id
and r.program_application_id = t.application_id
and r.concurrent_program_id = t.concurrent_program_id
and to_char(sysdate-r.actual_start_date)*1440 > 60
and r.Phase_Code = 'R' and r.Status_Code = 'R'
order by to_char(sysdate-r.actual_start_date)*1440 ) f where rownum < 6) f1,
v$session s,
v$process p,
v$sqltext st
WHERE
p.spid = f1.oracle_id
and p.addr = s.paddr
and s.sql_address = st.address
and s.sql_hash_value = st.hash_value
order by cy,st.piece
/

Monitors for excessive JDBC connections and alerts if the connection count breaches the defined threshold.

Use the following query:
select count(*) from v$session where program like 'JDBC Thin%'

How to check JDBC Connection ?
connect using apps, sys or system & issue
select count(*), module from v$session where program like '%JDBC%' group by module;

Command to kill a session I.e also to release a lock heldby a table
alter system kill session 'sid,serial#';

REQUEST ID TAKING LONG TIME
SQL> select REQUEST_ID,ORACLE_ID,ORACLE_PROCESS_ID,ORACLE_SESSION_ID,OS_PROCESS_ID from FND_CONCURRENT_REQUESTS where REQUEST_ID=10779300;

REQUEST_ID ORACLE_ID ORACLE_PROCESS_ID ORACLE_SESSION_ID
---------- ---------- ------------------------------ -----------------
OS_PROCESS_ID
--------------------------------------------------------------------------------
10779300 900 15875 32829458
29985

SQL> select addr from v$process where spid=15875;

ADDR
----------------
C0000000513FEAF0



SQL> select sid,status,serial# from v$session where paddr='C0000000513FEAF0';

SID STATUS SERIAL#
---------- -------- ----------
178 ACTIVE 48878

SQL> select SOFAR,TOTALWORK from v$session_longops where sid=178;

SOFAR TOTALWORK
---------- ----------
16576 16576
1116 12668

SQL> /

SOFAR TOTALWORK
---------- ----------
16576 16576
1131 12668

SQL> select sql_hash_value from v$session_longops where sid=178;

SQL_HASH_VALUE
--------------
2468084395
2468084395


SQL> select sql_text from v$sql where hash_value='2468084395';

SQL_TEXT
--------------------------------------------------------------------------------
SELECT CRRID.* FROM CNC_RS_RES_INT_DELTA CRRID WHERE CRRID.PROCESS_FLAG IN ('PRO
CESSED','UNPROCESSED','ERRORED') AND (CRRID.PROCESS_TYPE = 'DELETE' OR ( CRRID.P
ROCESS_TYPE = 'NEW' AND CRRID.END_DATE_ACTIVE IS NOT NULL) ) AND NOT EXISTS ( SE
LECT 1 FROM CNC_RS_RG_INT_DELTA CRRID1 WHERE CRRID1.SOURCE_ID = CRRID.SOURCE_ID
AND CRRID1.PROCESS_FLAG IN ('G','ERRORED','UNPROCESSED') ) ORDER BY CRRID.START_
DATE_ACTIVE


SQL> select last_analyzed from dba_tables where table_name='CNC_RS_RES_INT_DELTA';

LAST_ANAL
---------
22-Dec-05


This is a quick note to share a SQL that will tell you the FND_USER.USER_NAME of the person that has locked a given table in Oracle APPS.
The column named ""module"" will tell you the name of the Form Function or the Concurrent Program Short name which has aquired a lock onto that table.

SELECT c.owner
,c.object_name
,c.object_type
,fu.user_name locking_fnd_user_name
,fl.start_time locking_fnd_user_login_time
,vs.module
,vs.machine
,vs.osuser
,vlocked.oracle_username
,vs.sid
,vp.pid
,vp.spid AS os_process
,vs.serial#
,vs.status
,vs.saddr
,vs.audsid
,vs.process
FROM fnd_logins fl
,fnd_user fu
,v$locked_object vlocked
,v$process vp
,v$session vs
,dba_objects c
WHERE vs.sid = vlocked.session_id
AND vlocked.object_id = c.object_id
AND vs.paddr = vp.addr
AND vp.spid = fl.process_spid(+)
AND vp.pid = fl.pid(+)
AND fl.user_id = fu.user_id(+)
AND c.object_name LIKE '%' || upper('&tab_name_leaveblank4all') || '%'
AND nvl(vs.status
,'XX') != 'KILLED';

Helpful Scripts in R12

Query to find the Languages Installed in Oracle Apps 11i and R12

Select distinct NLS_LANGUAGE,
LANGUAGE_CODE,
NLS_TERRITORY
from fnd_languages
where INSTALLED_FLAG = 'I' or INSTALLED_FLAG = 'B'
ORDER BY NLS_LANGUAGE


How to install XDB on DB 9.2


Please use following steps to install the XDB (Follow all the steps):

1.XDB Installation:
==============

The catqm.sql script requires the following parameters be passed to it when run:

A. XDB user password
B. XDB user default tablespace
(Any tablespace other than SYSTEM, UNDO and TEMP can be specified.
The specified tablespace must already exist prior to running the script.)
C. XDB user temporary tablespace

Therefore, the syntax to run catqm.sql is the following:
SQL> @?/rdbms/admin/catqm.sql A B C

For example:
SQL> @?/rdbms/admin/catqm.sql XDB XDB TEMP

## IMPORTANT: You must shutdown and restart the database between removal and reinstall ##

SQL> spool xdb_install.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup;
SQL> @?/rdbms/admin/catqm.sql <XDB pwd> <XDB default tbs> <XDB temporary tbs>
SQL> @?/rdbms/admin/catxdbj.sql
SQL> @?/rdbms/admin/utlrp.sql
SQL> spool off

2.Verify XDB Installation:
===================

spool xdb_status.txt

set echo on;
connect / as sysdba
set pagesize 1000
col comp_name format a36
col version format a12
col status format a8
col owner format a12
col object_name format a35
col name format a25

-- Check status of XDB

select comp_name, version, status
from dba_registry
where comp_id = 'XDB';

-- Check for invalid objects owned by XDB

select owner, object_name, object_type, status
from dba_objects
where status = 'INVALID'
and owner = 'XDB';

spool off;

Please use following note-id for your reference:

Master Note for Oracle XML Database (XDB) Install / Deinstall [ID 1292089.1]

PATCH related scripts in 11i and R12

/*Query to find out the patch number which fixed the bugs listed in the adbugs*/

select distinct a.bug_number,e.patch_name,c.end_date,b.applied_flag 
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 in ('11071188');

ORDER BY 1 DESC;


/* Query to find out if any patch except localisation patch is applied or not, if applied, that what all drivers it contain and time of it’s application*/ 
select A.APPLIED_PATCH_ID, 
A.PATCH_NAME, 
A.PATCH_TYPE, 
B.PATCH_DRIVER_ID, 
B.DRIVER_FILE_NAME, 
B.ORIG_PATCH_NAME, 
B.CREATION_DATE, 
B.PLATFORM, 
B.SOURCE_CODE, 
B.CREATION_DATE, B.FILE_SIZE, B.MERGED_DRIVER_FLAG, B.MERGE_DATE from AD_APPLIED_PATCHES A, AD_PATCH_DRIVERS B where A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID and A.PATCH_NAME = '';

/* To know that if the patch is applied successfully, applied on both node or not, start time of patch application and end time of patch application, patch top location , session id … patch run id */
select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.NAME, C.DRIVER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.START_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, AD_APPL_TOPS B, AD_PATCH_DRIVERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in 
(select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = '')) ORDER BY 3;


* To get file version of any application file which is changed through patch application */
select A.FILE_ID, 
A.APP_SHORT_NAME, 
A.SUBDIR, 
A.FILENAME, 
max(B.VERSION) from AD_FILES A, 
AD_FILE_VERSIONS B where 
A.FILE_ID = B.FILE_ID and 
B.FILE_ID = 86291 group by 
A.FILE_ID, A.APP_SHORT_NAME, 
A.SUBDIR, A.FILENAME

/* To get information related to how many time driver file is applied for bugs */ 

select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS where BUG_NUMBER = ' '

/* To find latest patchset level for module installed */ 

select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY APP_SHORT_NAME

/* To find what is being done by the patch */ 
select A.BUG_NUMBER "Patch Number", 
B. PATCh_RUN_BUG_ID "Run Id",
D.APP_SHORT_NAME appl_top, 
D.SUBDIR, 
D.FILENAME, 
max(F.VERSION) latest, 
E.ACTION_CODE action from 
AD_BUGS A, 
AD_PATCH_RUN_BUGS B, 
AD_PATCH_RUN_BUG_ACTIONS C, 
AD_FILES D, 
AD_PATCH_COMMON_ACTIONS E, 
AD_FILE_VERSIONS F where 
A.BUG_ID = B.BUG_ID and 
B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and 
C.FILE_ID = D.FILE_ID and 
E.COMMON_ACTION_ID = C.COMMON_ACTION_ID and 
D.FILE_ID = F.FILE_ID and 
A.BUG_NUMBER = '' and B.PATCH_RUN_BUG_ID = ' < > ' and 
C.EXECUTED_FLAG = 'Y' GROUP BY 
A.BUG_NUMBER, 
B.PATCH_RUN_BUG_ID, 
D. APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE

/* Second Query to know, what all has been done during application of PATCH */ 
Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUNS G, AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and G.APPL_TOP_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and I.APPLIED_PATCH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FLAG = ‘Y’ and G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = ‘’)) GROUP BY J.PATCH_NAME, H.APPLICATINS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_BNAME, D.APP_SHORT_NAME, D.SUBDIR, D.FILENAME, E.ACTION_CODE


/* To find Merged patch Information from database in Oracle Applications */
select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers where applied_patch_id =&n) );

/* Script to find out Patch level of mini Pack */
Select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_level like ‘%&shortname%’;
Replace short name by name of Oracle Apps Minipack for which you want to find out Patch level . ex.
AD – for Applications DBA
GL – for General Ledger
PO – Purchase Order

Query to check .Autoconfig patch Level 

11i

SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10
select bug_number, decode(bug_number,
'2488995' ,'11i.ADX.A'
,'2682177' ,'11i.ADX.B'
,'2682863' ,'11i.TXK-C'
,'2757379' ,'11i.TXK-D'
,'2902755' ,'11i.TXK-E'
,'3002409' ,'11i.ADX.C'
,'3104607' ,'11i.TXK-F'
,'3219567' ,'11i.TXK-B'
,'3239694' ,'11i.TXK-G'
,'3271975' ,'11i.ADX.E'
,'3416234' ,'11i.TXK-H'
,'3453499' ,'11i.ADX.F'
,'3594604' ,'11i.TXK-I'
,'3817226' ,'11i.ADX.E.1'
,'3950067' ,'11i.TXK-J'
,'4104924' ,'11i.TXK-K'
,'4367673' ,'11i.TXK-J.1'
,'4717668' ,'11i.TXK-M'
,'5035661' ,'11i.One_off'
,'5107107' ,'11i.TXK-N ROLLUP PATCH (AUG 2'
,'5414396 ' ,'11i RAPIDCLONE CONSOLIDATED FIXES JAN/2008 '
,'5456078' ,'11i.One_off_a'
,'5473858' ,'11i.ATG_PF.H RUP5'
,'5478710' ,'11i.TXK-O'
,'5759055' ,'11i.TXK-P'
,'5903765' ,'11i.ATG_PF.H RUP6'
,'5985992' ,'11i.TXK-Q'
) p_num, last_update_date
FROM ad_bugs
WHERE bug_number IN ( '2488995' ,'2682177' ,'2682863' ,'2757379' ,'2902755' ,'3002409' ,'3104607' ,'3219567' ,'3239694' ,'3271975' ,'3416234' ,'3453499' ,'3594604' ,'3817226' ,'3950067' ,'4104924' ,'4367673' ,'4717668' ,'5035661' ,'5107107' ,'5414396 ' ,'5456078' ,'5473858' ,'5478710' ,'5759055' ,'5903765' ,'5985992' );


R12

===


SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10
spool LACF_ptch_level.txt
select ' LACF ' FROM dual;
/
select bug_number, decode(bug_number,
'4494373' ,'R12.TXK.A'
,'5872965' ,'R12.OAM.A'
,'5909746' ,'R12.TXK.A.1'
,'5917601' ,'R12.TXK.A.2'
,'6077487' ,'R12.TXK.A.DELTA.3'

,'6329757' ,'R12.TXK.A.DELTA.4'
,'6145693 ' ,'R12 RAPIDCLONE CONSOLIDATED FIXES JAN/2008'
) p_num, last_update_date
FROM ad_bugs
WHERE bug_number IN ( '4494373' ,'5872965' ,'5909746' ,'5917601' ,'6077487' ,'6145693 ','6329757' );


Query to check AD Patch level

11i

==

SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10


select bug_number, decode(bug_number,
'1351004' '11i.AD.A'
,'1460640' ,'11i.AD.B'
,'1475426' ,'11i.AD.C'
,'1627493' ,'11i.AD.D'
,'1945611' ,'11i.AD.E'
,'2141471' ,'11i.AD.F'
,'2344175' ,'11i.AD.G'
,'2673262' ,'11i.AD.H'
,'4038964' ,'11i.AD.I.1'
,'4229931' ,'11i.AD.I.2'
,'4337683' ,'11i.AD.I.2'
,'4502904' ,'11i.AD.I.3'
,'4605654' ,'11i.AD.I.4 Delta.4'
,'4712847' ,'11i.AD.I.3'
,'4712852' ,'11i.AD.I.4'
,'5161676' ,'11i.AD.I.5'
,'5161680' ,'11i.AD.I.5'

,'6502079' ,'11i.AD.I.Delta.6'

,'6502082' ,'11i.AD.I.6'

) p_num, last_update_date
FROM ad_bugs
WHERE bug_number IN ( '1351004' '1460640' '1475426' '1627493' '1945611' '2141471' '2344175' '2673262' '4038964' '4229931' '4337683' '4502904' '4605654' '4712847' '4712852' '5161676' '5161680','6502079','6502082' );



R12

==



SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10

select bug_number, decode(bug_number,
'4502962' 'R12.AD.A'
,'5905728' ,'R12.AD.A.1'
,'6014659' ,'R12.AD.A.2'

,'6272715' ,'R12.AD.A.3'

,'6510214' ,'R12.AD.A.4'
) p_num, last_update_date
FROM ad_bugs
WHERE bug_number IN ( '4502962' '5905728' '6014659','6272715','6510214' );


Query to Check ATG (Techstack) Patch level

11i

===

SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10
select bug_number, decode(bug_number,
'3438354', '11i.ATG_PF.H'
,'4017300' ,'11i.ATG_PF.H.RUP1'
,'4125550' ,'11i.ATG_PF.H.RUP2'
,'4334965' ,'11i.ATG_PF.H RUP3'
,'4676589' ,'11i.ATG_PF.H RUP4'
,'5382500' ,'11i.ATG_PF.H RUP5 HELP'
,'5473858' ,'11i.ATG_PF.H.5'
,'5674941' ,'11i.ATG_PF.H RUP5 SSO Integrat'
,'5903765' ,'11i.ATG_PF.H RUP6'
,'6117031' ,'11i.ATG_PF.H RUP6 SSO 10g Integration'
,'6330890' ,'11i.ATG_PF.H RUP6 HELP'
) p_num, last_update_date
FROM ad_bugs
WHERE bug_number
IN ( '3438354', '4017300', '4125550', '4334965', '4676589', '5382500', '5473858', '5674941', '5903765', '6117031', '6330890' );


R12
===
SET head off Lines 120 pages 100
col p_num format A65
col bug_number format A10
col patch_name format A10

select bug_number, decode(bug_number,
'5917344', 'R12.ATG_PF.A.DELTA.2',
'6077669', 'R12.ATG_PF.A.DELTA.3',
'6272680', 'R12.ATG_PF.A.DELTA.4 '
) p_num, last_update_date
FROM ad_bugs
WHERE bug_number
IN ('5917344', '6077669', '6272680');


Query to check Product patch levels 

set linesize 1000
column APPS format a10
select decode(nvl(a.APPLICATION_short_name,'Not Found'),
'SQLAP','AP','SQLGL','GL','OFA','FA',
'Not Found','id '||to_char(fpi.application_id),
a.APPLICATION_short_name) apps,
decode(fpi.status,'I','Installed','S','Shared',
'N','Inactive',fpi.status) status,
fpi.product_version,
nvl(fpi.patch_level,'-- Not Available --') Patchset,
to_char(fpi.last_update_date,'dd-Mon-RRRR') "Update Date"
from fnd_oracle_userid o, fnd_application a, fnd_product_installations fpi
where fpi.application_id = a.application_id(+)
and fpi.oracle_id = o.oracle_id(+)
order by 1,2
/

Running the following query will tell you which family pack of HRMS you are on in 11i.

SELECT ‘HR_PF.’ ||
DECODE (BUG_NUMBER,’2115771' ,’A(2115771)’,
‘2268451' ,’B(2268451)’,
‘2502761' ,’C(2502761)’,
‘2632500' ,’D(2632500)’,
‘2803988' ,’E(2803988)’,
‘2968701' ,’F(2968701)’,
‘3116666' ,’G(3116666)’,
‘3233333' ,’H(3233333)’,
‘3127777' ,’I(3127777)’,
‘3333633' ,’J(3333633)’,
‘3500000' ,’K(3500000)’,
‘5055050' ,’K RUP1(5055050)’,
‘5337777' ,’K RUP2(5337777)’,
‘6699770' ,’K RUP3(6699770)’,
‘7666111' ,’K RUP4(7666111)’) ||
‘ patchset is installed ‘ “HR Family Pack”,
to_char(last_update_date,’DD-MON-YYYY HH24:MI:SS’) “DATE APPLIED”
FROM AD_BUGS
WHERE BUG_NUMBER in (‘2115771',’2268451',’2502761',’2632500',’2803988',
‘2968701',’3116666',’3233333',’3127777',’3333633',’3500000', ‘5055050',
‘5337777',’6699770',’7666111')
ORDER BY BUG_NUMBER DESC
/


To find localization patches are applied.select * from jai_applied_patches where patch_number = 7361928;

How to check whether the product is install,shared and Not installed in Apps.
select t.application_name
, t.application_id
, i.patch_level
, decode(i.status,’I',’Fully Installed’,
‘N’,'Not Installed’,'S’,'Shared’,'Undetermined’) status
from fnd_product_installations i
, fnd_application_vl t
where i.application_id = t.application_id
order by t.application_id;


/* To find the latest application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS "how it is done", BASE_RELEASE_FLAG "Base version" FROM AD_RELEASES where END_DATE_ACTIVE IS NULL


/* to find the base application version */ 

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES where BASE_RELEASE_FLAG = 'Y'


/* To find all available application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE "when lasted", CASE WHEN BASE_RELEASE_FLAG = 'Y' Then 'BASE VERSION' ELSE 'Upgrade' END "BASE/UPGRADE", ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES

It shows patches applied to multiple application tiers - this sql shows if the 11.5.10.2 maintenance pack has been applied (patch number 3480000)

DECLARE
TYPE p_patch_array_type is varray(30) of varchar2(10);
p_patchlist p_patch_array_type;
p_appltop_name varchar2(50);
p_patch_status varchar2(15);
p_appl_top_id number;
p_result varchar2(15);
p_instance varchar2(15);
gvAbstract varchar2(240) := NULL;
CURSOR alist IS
select appl_top_id, name from ad_appl_tops;
procedure println(msg in varchar2)
is
begin
dbms_output.enable(1000000);
dbms_output.put_line(msg);
end;
BEGIN
select instance_name into p_instance from v$instance;
open alist;
p_patchlist:= p_patch_array_type('3480000');
LOOP
FETCH alist INTO p_appl_top_id,p_appltop_name;
EXIT WHEN alist%NOTFOUND;
IF p_appltop_name NOT IN ('GLOBAL','*PRESEEDED*')
THEN
println(p_appltop_name || ' - - - ' || p_instance );
println('=============================');
for i in 1..p_patchlist.count
loop
begin
select ABSTRACT into gvAbstract
from FND_UMS_BUGFIXES
where BUG_NUMBER = p_patchlist(i);
exception
when NO_DATA_FOUND then
gvAbstract := NULL;
end;
p_patch_status := ad_patch.is_patch_applied('11i',p_appl_top_id,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)|| ' - ' || substr(gvAbstract,1,25) || ' - was ' || p_result);
end loop;
END if;
println('.');
END LOOP;
close alist;
END;
/

To check if specific bug fix is applied, you need to query the AD_BUGS table only. This table contains all patches and all superseded patches ever applied:

select ab.bug_number, ab.creation_date
from ad_bugs ab
where ab.bug_number = '&BugNumber';

Retrieve basic information regarding patch applied, useful when you need to know when and where (node) you applied specific patch:
select aap.patch_name, aat.name, apr.end_date
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_appl_tops aat
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and aat.appl_top_id = apr.appl_top_id
and aap.patch_name = '&PatchName';

Run the following query, it will show you all modules affected by specific patch in one click…
select distinct aprb.application_short_name as "Affected Modules"
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_patch_run_bugs aprb
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and apr.patch_run_id = aprb.patch_run_id
and aprb.applied_flag = 'Y'
and aap.patch_name = '&PatchName';

One of the ways to find out the exact patchset that was applied to your database successfully, is you can query from props$ table. This table is owner by sys. Logon as system or sys and select from props$ table. This table has fields like name, values and comments. The name columne NLS_RDBMS_VERSION has the value equilent to the patchset applied to that database.

SQL> select name, value$ from props$;
NAME VALUE$
NLS_RDBMS_VERSION 7.3.4.3.1

Query to find languages installed or not:

Select distinct NLS_LANGUAGE, LANGUAGE_CODE,NLS_TERRITORY,INSTALLED_FLAG
from fnd_languages
where INSTALLED_FLAG = 'I' or INSTALLED_FLAG = 'B'
ORDER BY NLS_LANGUAGE

Select distinct NLS_LANGUAGE, LANGUAGE_CODE,NLS_TERRITORY,INSTALLED_FLAG
from fnd_languages
ORDER BY NLS_LANGUAGE

Tech stack validation:
Ensure that your current working directory is
patch unzipped location]/fnd/patch/115/bin

on Unix or Linux:
Ensure "APPLRGF" variable is set in environment. If not, set it to the same value as "APPLTMP".
./txkprepatchcheck.pl -script=ValidateRollup
-outfile=$APPLTMP/txkValidateRollup.html
-appspass=
or
./txkprepatchcheck.pl -script=ValidateRollup -outfile=$APPLTMP/txkValidateRollup.txt -reporttype=text -appspass=crepti12

Query to check customizations are affected by a patch
This script will read cr_customization.txt file
xx_custom=/local/dba/scripts_vis/cr_customization.txt
patch_loc=/patch11i/vis_patches/6329356
echo "checking for customizations under ${patch_loc}"
cd ${patch_loc}
cat ${xx_custom} | while read line
do
if [ "$line" != "" ];
then
grep -i "$line" /vis/applmgr/11510/admin/VIS/log/u5014514.drv.log

fi
done

To knowd all the patdhes applied from 01-Sep-2005 to 28-Jan-2006. i.e b/w 2 dates use
$AD_TOP/patch/115/sql/adpchlst.sql

To check to make sure the correct data was installed run the following script this script can also be used to check if datainstaller was run successfully:
select application_short_name, Legislation_code, status, action, last_update_date
from hr_legislation_installations
where application_short_name in ('PER','PAY');

To check if DB version is 32 or 64 bit:
a.) conn to sqlplus if it is 64 ,then will show
b.)select address from v$sql where rownum<2;
c.)go to ORACLE_HOME/bin
do a file oracle.

Commands usefull during Patch analysis
select bug_number from ad_bugs where bug_number='&t';
select to_char(CREATION_DATE,'dd-mon-yyyy hh24:mi:ss') from ad_bugs where bug_number=’&t’;
select to_char(LAST_UPDATE_DATE,'dd-mon-yyyy hh24:mi:ss')from ad_bugs where bug_number='&t’;
select patch_level from fnd_product_installations where patch_level like '&p';
select release_name from fnd_product_groups;
select DRIVER_FILE_NAME from ad_patch_drivers where DRIVER_FILE_NAME like '%3117672%';


For querrying the MERGED PATCHES you can use the following script which will show which merged patches are applied for which language
select a.PATCH_DRIVER_ID,DRIVER_FILE_NAME,c.bug_id,d.language
from ad_patch_drivers a,AD_COMPRISING_PATCHES b, ad_bugs
c,AD_PATCH_DRIVER_LANGS d
where c.bug_number = '&no'
and c.bug_id = b.bug_id
and a.PATCH_DRIVER_ID = b.patch_driver_id
and a.patch_driver_id = d.patch_driver_id;

we can querry the ad_bugs for the US language version patches


To know which services are running on what nodes
select SUPPORT_CP,SUPPORT_FORMS,SUPPORT_WEB,SUPPORT_ADMIN from fnd_nodes;


To Know All the Drivers (NLS) language applied to Instance? 

col PATCH_NAME format a10
col PATCH_TYPE format a10
col DRIVER_FILE_NAME format a15
col PLATFORM format a10
select AP.PATCH_NAME, AP.PATCH_TYPE, AD.DRIVER_FILE_NAME, AD.CREATION_DATE, AD.PLATFORM,AL.LANGUAGE
from AD_APPLIED_PATCHES AP, AD_PATCH_DRIVERS AD, AD_PATCH_DRIVER_LANGS AL
where AP.APPLIED_PATCH_ID = AD.APPLIED_PATCH_ID
and AD.PATCH_DRIVER_ID = AL.PATCH_DRIVER_ID
and AP.PATCH_NAME = '&No';"

select aap.patch_name,count(*) from AD_patch_driver_langs apdl, ad_applied_patches aap, AD_PATCH_DRIVERS apd
where apdl.patch_driver_id=apd.patch_driver_id and
aap.applied_patch_id=apd.applied_patch_id and
apdl.language <>'US'
group by aap.patch_name
having count(*) > 0 and count(*)<10 -- Changed from 9 to 10
order by patch_name"

To see NLS patches applied:
select language,driver_file_name from AD_PATCH_DRIVERS adp,AD_PATCH_DRIVER_LANGS adpl where adp.patch_driver_id = adpl.patch_driver_id
and driver_file_name like '%&a%' order by 1;

Script for Patch Log Analysis :
@$AD_TOP/patch/115/sql/adphrept.sql 1 ALL ALL 03/01/2004 07/05/2004 ALL ALL ALL ALL ALL N N N N N sample.txt


To know patches applied
select distinct(patch_name) from ad_applied_patches

AD Patches Tables
AD_APPLIED_PATCHES
AD_PATCH_DRIVERS
AD_PATCH_RUNS
AD_APPL_TOPS
AD_RELEASES
AD_FILES
AD_FILE_VERSIONS
AD_PATCH_RUN_BUGS
AD_BUGS
AD_PATCH_COMMON_ACTIONS
AD_PATCH_RUN_BUG_ACTIONS
ad_comprising_patches

FND Tables
FND_APPL_TOPS
FND_LOGINS
FND_USER
FND_DM_NODES
FND_TNS_ALIASES
FND_NODES
FND_RESPONSIBILITY
FND_DATABASES
FND_UNSUCCESSFUL_LOGINS
FND_LANGUAGES
FND_APPLICATION
FND_PROFILE_OPTION_VALUES


To know which driver patch has been applied:
select DRIVER_FILE_NAME from AD_PATCH_DRIVERS;
select DRIVER_FILE_NAME from AD_PATCH_DRIVERS where DRIVER_FILE_NAME like '%2408149%';


To check if multicurrency is present
select MULTI_CURRENCY_FLAG from fnd_product_groups;
M
-
Y

Purging timing information for prior sessions.
sqlplus -s APPS/***** @$AD_TOP/admin/sql/adtpurge.sql 10 1000

Snapshot sql
sqlplus -s &un_apps/***** @$AD_TOP/patch/115/sql/adbkflsn.sql 111

Maintenance mode
$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE
select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
FND_PROFILE.VALUE('APPS_MAINTENANCE_MODE')
--------------------------------------------------------------------------------
MAINT


to check the product is registered
select * from applsys.fnd_application where application_short_name='BNE';


adutconf.sql --- script used to generate Oracle Applications Database Configuration Report
Location : $AD_TOP/sql/adutconf.sql
Output : $AD_TOP/sql/adutconf.lst

PRODUCT VERSIONS (AD,PO,....)
select patch_level from fnd_product_installations where patch_level like '%&PRODUCT_NAME%';
select PATCH_LEVEL from fnd_product_installations where PATCH_LEVEL like '%AD%';
select PATCH_LEVEL,status from fnd_product_installations where PATCH_LEVEL like '%ICX%';

applying opatch without inventory
opatch apply -no_inventory
$ORACLE_HOME/cfgtoollogs/opatch/opatch-2009_Oct_29_22-33-37-CST_Thu.log --> opatch log location


To find opatch version:
/OPatch/
./opatch version


opatch options:
$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
opatch apply -local: apply patch only on local node in clusterdatabase environment
opatch apply -jdktop : if opatch could not find the path of jdk
opatch apply -no_inventory : Apply patch without updating inventory

to find the opatch that are installed
cd /OPatch/.patch_storage

OR cd /unioac/oracle/product/920/OPatch/
./opatch lsinventory
If it fails please check the path is correct in /etc/oraInst.loc or /var/opt/oracle/oraInst.loc

From CPUJan2006 onwards, for the OPatch installed CPU’s it is possible to do the following
select * from registry$history;

ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
—————————- —— ——— ———- ——— ———-
09-MAY-07 07.17.43.371379 AM CPU SERVER 10.2.0.2.0 5689957 CPUJan2007"

CPU will create directories and files like %ORACLE_HOME%\cpu\CPUOct2005\patch.log or $ORACLE_HOME/cpu/CPUOct2005/install.log

Syntax to merge set of patches
admrgpch -s temp -d 3171663_NLS
admrgpch -s merge_nov11 -d merge_cnv1_nov11 -logfile merge_cnv1_nov11.log


To know products and patches present in system
/SQL/adutconf.lst



adpatch options
Adpatch no longer checks for prerequisite patches as part of the patch
to force this check:
adpatch options=prereqs

To see what the patch does without applying it (a good idea when
patching in a production environment)
adpatch apply=no"

To bypass the irritating maintenance mode requirement run:
adpatch options=hotpatch"

How do you hide apps password during adpatching?
Ans:
adpatch flags=hidepw"
adpatch options=noprereq
adpatch options=nocopyportion,nogenerateportion i.e to apply only database portion of u driver on db/admin node
options=nocompilejsp
on admin1 opations=nocompiledb, on admin 2 options=nocompiledb,nodatabaseportion, on web1 options=nocompiledb,nodatabaseportion, on web2 options=nocompiledb,nodatabaseportion
opatch options=nofilecheck (for not checking version of patch in database from ad_patch_version table
adpatch options=nodatabaseportion ( this is required while applying patches on external nodes )
adpatch options=nodatabaseportion,nocompiledb,nocompilejsp,norevcache

adpatch options :

adpatch options=nocompilejsp
adpatch options=forcecopy
adpatch options=noprereq,hotpatch,nocompilejsp

adpatch options = ""hotpatch,noautoconfig,nocompilejsp"".
adpatch options = ""hotpatch,nodatabaseportion,nocompilejsp,noautoconfig"".

adpatch options=nocheckfile,hotpatch,nocopyportion,nogenerateportion
adpatch options = ""novalidate""

On external Webnode:
adpatch options=nogenerateportion,nodatabaseportion"

Verify that you do not want to restart the previous failed session.
Start AutoPatch with the abandon=yes option:
UNIX:
$ adpatch defaultsfile=$APPL_TOP/admin/testdb1/def.txt logfile=7654321.log \
patchtop=$APPL_TOP/patches/7654321 driver=c7654321.drv workers=3 \
interactive=no abandon=yes



Create the defaults file 
adpatch defaultsfile=$APPL_TOP/admin/testdb1/adpatchdef.txt

Create Defaultsfile.txt

adpatch defaultsfile=$APPL_TOP/admin/$TWO_TASK/defaults.txt

( You can keep this txt file in any location of your choice)
Now abort autopatch section at point where it asks for patch directory by ctrl +c or ctrl+d
Now check if this file exists
You have to do above steps only once in an environment to create defaults file.
====================================
Apply as per below-

time adpatch \
defaultsfile=$APPL_TOP/admin/$TWO_TASK/defaults.txt \
logfile=u5394384.log \
patchtop=/d31/app/upgrade_115102/BASE_PATCHES/5394384 \
driver=u5394384.drv \
workers=8 \
interactive=yes \
abandon=yes


R12
PAA helps users to track and perform manual steps during patching Executed by invoking

$AD_TOP/bin/admsi.pl…
When patches are merged using admrgpch, PAA merges readme files and this avoids redundant tasks. Also it simplifies patch application by combining all manual steps


To find some products patch level

ATG rollup patch level by pointing your browser to this URL -> http://hostname:port/OA_HTML/OAInfo.jsp

How to Find iReceviables Patchset Level on 11i Instance [ID 263942.1]
[ID 307564.1]

How to Find iReceviables Patchset Level on 11i Instance [ID 263942.1]

How To Determine Which HZ-Trading Community Architecture (TCA), Oracle Customers Online (IMC), Oracle Credit Management (OCM), TAX (AR), CUs And Framework

(FWK) Patchset Has Been Applied? [ID 262680.1]



Change the Patch Wizard directory patch
Login to OAM

Navigate to Patch Wizard and then click Go Button
Under Patch Wizard Tasks you will find the below along with 3 more task names
Task Name
Patch Wizard Preferences

Click the Icon under Tasks

then change the value of Staging directory from /d01/applmgr/prodappl/pwizard to the /d01/apreprod/preprodappl/pwizard

you trace 10.1.0.6 OUI by running the following command
/usr/bin/truss -aefo /tmp/oui.trc ./runInstaller

// This will bypass the OS check //

runInstaller eg
$ JAVA_HOME=/u01/app/oracle/product/jdk1.6.0_16; export JAVA_HOME

$ ./runInstaller -jreLoc $JAVA_HOME

runInstaller -ignoreSysPrereqs

Query used to view the patch level status of all modules 
SELECT a.application_name,
DECODE (b.status, 'I', 'Installed', 'S', 'Shared', 'N/A') status,
patch_level
FROM apps.fnd_application_vl a, apps.fnd_product_installations b
WHERE a.application_id = b.application_id;

Check Current Applied Patch 
SELECT patch_name, patch_type, maint_pack_level, creation_date
FROM applsys.ad_applied_patches
ORDER BY creation_date DESC

To know if OTA is running or not:
@$ECX_TOP/patch/115/sql/ecxver.sql

patchsets.sh
ftp://oracle-ftp.oracle.com/apps/patchsets/PATCHSET_COMPARE_TOOL/patchsets.sh
ftp ftp.oracle.com
login as an anonymous user, and then:
cd support/outgoing/PATCHSET_COMPARE_TOOL
mget patchsets.sh