On windows environment the patch type to be applied on Oracle is BP (Bundle Patch)
Set your PATH setting as follows:
set PATH=%ORACLE_HOME%\perl\bin;%PATH%
Ensure that Oracle database services in windows are stopped
Stop the Distributed Transaction Coordinator service:
net stop msdtc
Go to the location of your patch directory.
** Important Remark: download the latest Opatch utility from Oracle MOS and place it under your Oracle Home location.
Now apply the patch by executing the following command:
C:\app\emodb\product\12.1.0\dbhome_3\OPatch\opatch apply
Successful patch message would look like this:
In a Multitenant environment CDB/PDB follow the following steps:
Start up the listener:
lsnrctl start LISTENER
startup all Oracle Services:
alter pluggable database all open;
cd %ORACLE_HOME%/OPatch
datapatch -verbose
******* It’s advisable to recompile all database objects after patching and ensure that all database components are “VALID”;
cd $ORACLE_HOME/rdbms/admin
SQL>@utlrp.sql
To check that the database patch applied successfully use the following query:
SQL> select * from dba_registry_sqlpatch ;
As shown below the patch applied 12.1.0.2.161018 (18th October 2016 Patch released for Oracle 12c)
You can perform the same query on one of the pluggable databases:
SQL> alter session set container=PDB_TEST;
SQL> select ACTION,STATUS, DESCRIPTION,LOGFILE from dba_registry_sqlpatch ;
The log file references the pluggable database name.