Patching Oracle, database datapatch fails with ORA-20004: Uninitialized state in install_file

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 databases on Windows platform. The platform is irrelevant though, but the 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 datapatch 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 possible 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 there have been to many bugs in the past with patching. Oracle is much more ‘resilient’ in patching.

Gerelateerd bericht