Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

How to apply DB PSU and OJVM PSU in 11.2.0.4 primary and standby DB

$
0
0
1a. Check the invalids
======================
Spool invalid_objects
select owner, object_name, object_type from dba_objects where status = 'INVALID';
spool off

1b. Download the patches
========================
cd /stage/patches
OPatch id :6880880 (if this is not existing already)
Db Patch  : 24732075
OJVM patch: 25434033



2. Shutdown All Instances and listener from production
=======================================================
$sqlplus / as sysdba

sql> shut immediate;
sql> exit.

$ lsnrctl stop

3. Stop the recovery and stop the standby
==========================================
$sqlplus / as sysdba
sql> alter database recover managed standby database cancel; 
sql> shut immediate;
sql> exit;

$ lsnrctl stop

3.Copy and unzip the latest OPATCH to the Oracle home and export the location:
=============================================================================
$ unzip <stage Location> p6880880_*_.zip -d $ORACLE_HOME

$ export PATH=$ORACLE_HOME/OPatch:$PATH

4. check pre-requisites for both PSU patch and OJVM patch
==========================================================
a) Unzip the patch:
-------------------
$ unzip <PATCH_TOP_DIR>/p24732075_*_.zip
$ unzip <PATCH_TOP_DIR>/p25434033_*_.zip

b) Collect the existing patch information in the oracle home.
------------------------------------------------------------
$ opatch lsinventory > before_patch

c) change the patch folder:
--------------------------
$ cd <PATCH_TOP_DIR>/24732075

d) check the Confilict for both patch before applying to the environment.
-------------------------------------------------------------------------
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

$ cd <PATCH_TOP_DIR>/25434033

e) check the Confilict for both patch before applying to the environment.
-------------------------------------------------------------------------
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./



5. After pre-requisites are meet, run the below command to apply the PSU and OJVM Patch.
=========================================================================================
$ cd <PATCH_TOP_DIR>/24732075

$ opatch apply

$ cd <PATCH_TOP_DIR>/25434033

$ opatch apply

Note : Do the same step from (1b to 5) for standby .

6. Collect the patch information in the oracle home after patching compltetion
==============================================================================

$opatch lsinventory

7.  compare the result with the step 6 and step 4(b) result.
============================================================

8) Bring up the database and listerner and run the post step only in primary
============================================================================
$ lsnrctl start

$sqlplus / as sysdba

sql>startup

PSU Post Step:
--------------
sql> @?/rdbms/admin/catbundle.sql psu apply

OJVM Post step:
--------------

cd $ORACLE_HOME/sqlpatch/25434033
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> startup upgrade
SQL> @postinstall.sql
SQL> shutdown
SQL> startup



=====
9) Compile the invalids.
========================
sqlplus / as sysdba

sql> @?/rdbms/admin/utlrp.sql
Check the invalids are the same as in step 1a.

Note : Do not need to run the step 8 & 9 on the standby site.

10) Check the patch applied information.
=======================================
$sqlplus / as sysdba
sql> SET linesize 200 pagesize 200
col action_time FOR a28
col version FOR a10
col comments FOR a30
col action FOR a10
col namespace FOR a12
col BUNDLE_SERIES format a15
SELECT comments  FROM registry$history;
Patch 25434033 applied
PSU 11.2.0.4.170418

11) Bring up the standby instance.
==================================
$ lsnrctl start

$ sqlplus / as sysdba

sql>startup nomount;
sql> alter database mount standby database;
sql> alter database open read only;

sql>alter database recover managed standby database disconnect from session;


12) Switch some logs and see, if they are in sync.
==================================================
$ sqlplus / as sysdba

sql> alter system switch logfile;

sql > exit

13) Identify the standby sync using standby alert log.
========================================================
14) Check the patch applied information in the standby.
========================================================
$sqlplus / as sysdba
sql> SET linesize 200 pagesize 200
col action_time FOR a28
col version FOR a10
col comments FOR a30
col action FOR a10
col namespace FOR a12
col BUNDLE_SERIES format a15
SELECT comments  FROM registry$history;
Patch 25434033 applied
PSU 11.2.0.4.170418


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>