Datapatch apply on 12c Databases after patch

Datapatch apply steps on 12c Databases after patch-

Run the below steps to apply datapatch for all the databases running on 12C RDBMS home.
Set environment
. oraenv 12c_DBname

Sqlplus / as sysdba
startup

* Check invalid objects-
COLUMN object_name FORMAT A30
SELECT owner,object_type,object_name,status
FROM dba_objects WHERE status = ‘INVALID’ and OWNER=’SYS’;

alter system set cluster_database=false scope=spfile sid=’*’;
Shutdown immediate
sqlplus /nolog
SQL> Connect / as sysdba

SQL> startup upgrade
SQL> exit
$ cd $ORACLE_HOME/OPatch
$ ./datapatch -verbose

$ sqlplus / as sysdba and alter system set cluster_database=true scope=spfile sid=’*’;
sql> shut immediate

$ srvctl start database -d 12c_DBname
Run the below query on the DB

SQL>select PATCH_ID, PATCH_UID, VERSION, STATUS, DESCRIPTION, action_time from DBA_REGISTRY_SQLPATCH order by BUNDLE_SERIES;
Run the utlrp to compile any invalid objects

@?/rdbms/admin/utlrp.sql
Run the below query in SQLPLUS

COLUMN object_name FORMAT A30
SELECT owner,
object_type,
object_name,
status
FROM dba_objects
WHERE status = ‘INVALID’ and OWNER=’SYS’;

Compare this invalid objects with the list which we have taken before datapatch apply and We should not have any extra invalid objects on SYS
Repeat these steps for all 12c databases

Leave a Reply

Your email address will not be published. Required fields are marked *