Sunday, June 6, 2021

Adop Phase Cleanup Issue ORA-04020: deadlock detected

 Adop Cleanup Issue: "[ERROR] [CLEANUP] ORA-04020: deadlock detected "


When attempting to complete an adop cycle, the following error occurs: 

(ADOP CLEANUP HUNGS FOREVER)

Running cleanup in STANDARD mode.
  Log: @ADZDSHOWLOG.sql "2018/07/16 02:51:22"
  [ERROR] [CLEANUP 1:1 ddl_id=69120] ORA-04020: deadlock detected while trying to lock object SYS.DBMS_SYS_SQL SQL: begin sys.ad_grants.cleanup; end;

Generating log report.
  Output: /<DIR>/R122/fs_ne/EBSapps/log/adop/19/20180716_015413/cleanup/lhosterp01/adzdshowlog.out

Summary report for current adop session:
  Node lhostwserp01: Completed successfully
  - Cleanup status: Completed successfully
  Node lhostwserp02: Completed successfully
  - Cleanup status: Completed successfully
  For more details, run the command: adop -status -detail


Cause :-


This issue is related to Bug 25449103 - QRE1227.2:AD:CLEANUP REPORTED ERROR FOR SYS.AD_GRANTS.CLEANUP
 
After running adop phase=cleanup:


Running cleanup in STANDARD mode.
Log: @ADZDSHOWLOG.sql "2018/07/09 08:57:59"
[ERROR] [CLEANUP 1:1 ddl_id=54777] ORA-04020: deadlock detected while trying to lock object SYS.DBMS_SYS_SQL SQL: begin sys.ad_grants.cleanup; end;

Discussed in Bug below:
Bug 25449103: QRE1227.2:AD:CLEANUP REPORTED ERROR FOR SYS.AD_GRANTS.CLEANUP

Solution :-

NOTE: Ensure that you have taken a backup of your system before applying the recommended solution


a) Connect to SQL*PLUS as APPS

SQL>select count(1)
  from dba_tab_privs
  where table_name='DBMS_SYS_SQL'
  and privilege='EXECUTE'
  and grantee='APPS'

If retun row.

b) Run the following command: "exec sys.ad_grants.cleanup;" 

c) Run the select below and verify 0 rows are returned:

  SQL>select count(1)
  from dba_tab_privs
  where table_name='DBMS_SYS_SQL'
  and privilege='EXECUTE'
  and grantee='APPS'

verify 0 rows are returned

6. Test if the adop cleanup issue is resolved. 


Doc id: Adop Cleanup Issue: "[ERROR] [CLEANUP] ORA-04020: deadlock detected " (Doc ID 2424333.1)

No comments: