Now this blog is with courtesy of my esteemed colleague Jeroen Nijholt, also a DBA/Technical Consultant with Ordina. I asked his permission to use some of his notes to blog about this. He was assigned to patch a few Oracle 220.127.116.11 databases on Windows platform. The platform is irrelevant though, but the 18.104.22.168 version is. Also the patch version is not relevant.
Now my colleague encountered this error when patching with datapatch:
ORA-20004: Uninitialized state in install_file
He got this error with database on a pdb$seed and on a cdb$root on different databases.
When you search MOS on this error, it’s not easy to find. After some digging he found this bug on MOS:
Datapatch fails with Error :ORA-01422: “exact fetch returns more than requested number of rows” & ORA-06512: “DBMS_SQLPATCH” (Doc ID 2294009.1)
In this Doc ID a workaround is mentioned, which after you have applied it, makes it able to perform a datapatch again, this time succesfully.
The cause for this bug is that a earlier datapatch went so fast that records in a certain sqlpatch view are too close to each other in time, causing a query in a next datapatch giving to many rows.
Jeroen and I think that for the Windows platform for Oracle 22.214.171.124. there have been to many bugs in the past with patching. Oracle 126.96.36.199 is much more ‘resilient’ in patching.