To apply psu patch on  physical standby database setup, 1st patch need to be applied on standby, and then on primary. Below are the steps.  Download patch from oracle support.

  1. Check the database_role for both dbs

PRIMARY> select database_role from v$database;

DATABASE_ROLE
—————-
PRIMARY

STANDBY> select database_role from v$database;

SDATABASE_ROLE
—————-
PHYSICAL STANDBY

2.Run below in primary to check log gap between primary and standby ( it should be zero)

PRIMARY >select LOG_ARCHIVED-LOG_APPLIED “LOG_GAP” from
(SELECT MAX(SEQUENCE#) LOG_ARCHIVED
FROM V$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED=’YES’),
(SELECT MAX(SEQUENCE#) LOG_APPLIED
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED=’YES’);

LOG_GAP
——

0

3. DISABLE SHIPPING ON PRIMARY

4. CANCEL THE RECOVERY ON STANDBY

Shutdown the listener and database in standby:

Go to the patch location in standby and unzip it.

Check the patch conflict with ORACLE_HOME

Now apply the patch(on standby)

Start the standby database in mount state and start the listener

Now shutdown the database and listener in primary

Go to patch location and unzip the patch

Check the patch conflict with ORACLE_HOME

Now apply the patch on primary

Now start up open the database and listener.

Enable archive shipping in primary

Start the recovery(MRP) on standby:

Run the catbundle.sql script from PRIMARY

Check the registry history in primary( this patch should be listed there)

Comments

Leave a Reply