Wednesday, 8 January 2014

adfilpu.sql Failing while applying R12.AD.C (10117518) patch - R12.2 Upgrade

As part of oracle R12.2 upgrade Applying the AD 12.2 Upgrade driver (10117518) was failing at adfilpu.sql script

adworker log was showing this error

FAILED: file adfilpu.sql  on worker  4.

worker log shows this

ERROR at line 1:
ORA-06550: line 1, column 99:
PL/SQL: ORA-00932: inconsistent datatypes: expected DATE got NUMBER
ORA-06550: line 1, column 8:
PL/SQL: SQL Statement ignored
ORA-06512: at line 16

The patch readme instructed to merge  R12.AD.C (patch#10117518) with AD CUP3 patch (patch#16595190:R12.AD.C) and apply. These patches were merged as instructed but applying the patch failed at adfilpu.sql

Further research on this taught me it was because of the blind insert performed by adfilpu.sql script
The patch 9477107 contains adfilpu.sql which has correct sql for proper insert. 

So i downloaded patch 9477107 and copied the adfilpu.sql from  patch  9477107 to the location where adfilpu.sql was running fom when the error occured(check the adwork00xx.log to get the location of the script) 

cd /u01/oracle/patches/app/fix/AD_source/9477107/ad/patch/115/sql
cp adfilpu.sql /u01/oracle/R122/fs1/EBSapps/appl/ad/12.0.0/patch/115/sql/

Used adctrl to restart the failed worker and adpatch was able to complete without issues.