Wednesday, December 29, 2010

"Synchronize WF LOCAL tables" request is failing with "ORA-20002: 4006:" error

Whenever we submit the "Synchronize WF LOCAL tables" request, it is failing with following error message,


FNDWFLSC module: Synchronize WF LOCAL tables
+---------------------------------------------------------------------------+

Current system time is 01-JUN-2010 01:41:09

+---------------------------------------------------------------------------+

**Starts**01-JUN-2010 01:41:09
**Ends**01-JUN-2010 01:41:43
ORA-20002: 4006: While creating necessary indexes, duplicate values were found preventing the creation of a unique index. This is caused by an improper view definition or data corruption that requires the attention of the Product Development Team handling 'PER_ROLE'.
ORA-20002: 4006: While creating necessary indexes, duplicate values were found preventing the creation of a unique index. This is caused by an improper view definition or data corruption that requires the attention of the Product Development Team handlin
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+

After further troubleshooting, We used the following SQL statement and Identified the duplicate rows in APPS.PER_ROLE_ROLES_V view,

SELECT NAME, ORIG_SYSTEM, ORIG_SYSTEM_ID,PARTITION_ID, COUNT(*) FROM
APPS.PER_ROLE_ROLES_V GROUP BY NAME, ORIG_SYSTEM, ORIG_SYSTEM_ID,PARTITION_ID
HAVING COUNT(*) > 1;


Finally we did the following DML for removing the duplication row,

update per_all_people_f
set effective_end_date = to_date ('23-oct-2009','dd-mon-yyyy')
where person_id= (Person_Id_Return_by_Select_Query)
and effective_start_date= to_date('23-Oct-2009','dd-mon-yyyy')
and effective_end_date= to_date('14-Jan-2010','dd-mon-yyyy');


delete from per_all_people_f
where person_id= (Person_Id_Return_by_Select_Query)
and effective_start_date= to_date('15-Jan-2010','dd-mon-yyyy');

commit;

Reran the "Synchronize WF LOCAL tables" request and it is completing normal.

Thanks,
Sasikumar.M

No comments:

Post a Comment