29213893

IMPORTANT

NOTE: It is critical that this patch is installed before attempting an upgrade.

https://support.oracle.com/rs?type=doc&id=2525596.1 Database Upgrade to 12.2, 18c, 19c fails with ORA-01422, ORA-06512 for SYS.DBMS_STATS

Check

Login as 'oracle' on the target server with the 12.2 environment set.

opatch lsinventory | grep 29213893

Download from Oracle

Download the patch from Oracle and place the zip file in /u01/img/122010

Download from Local Management Server

Download the patch from Oracle (as above) to /u01/img/122010 on your Local Management Server (if it is not already there).

mkdir -p /u01/img/122010
scp -pr ${PATCH_SERVE}:/u01/img/122010/p29213893_122010_Generic.zip /u01/img/122010

Unzip

cd /u01/img/122010
rm -rf /u01/img/122010/29213893
find . -name "p29213893_122010_Generic.zip" -exec unzip {} \;
rm *.zip

Pre-req check

cd /u01/img/122010/29213893
opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Install

NOTE: It is assumed that you will be applying this patch to an inactive ORACLE_HOME (i.e. an ORACLE_HOME that has been installed ready for an upgrade). In the unlikely event that you need to apply this to an active ORACLE_HOME, you should start an OEM Blackout and shutdown any database instances or Listeners running from the ORACLE_HOME before continuing.
cd /u01/img/122010/29213893
opatch apply -silent -ocmrf /u01/img/ocm.rsp
opatch lsinventory | grep 29213893

Rollback

cd /u01/img/122010/29213893
opatch rollback -id 29213893
opatch lsinventory | grep 29213893