Patch
Webniar – Patching Like a Hero
Category: Database Author: Andre Luiz Dutra Ontalba (Board Member) Date: 5 years ago Comments: 0

Webinar - Patching like a Hero

Hi guys !!

 

Yesterday we had our first Webinar and we are posting the webinar here for you.

 
 
Follow the link in the PDF presentation: Click here

 

 

 

See you next time.

André Ontalba – Board Member

 
 
 
 

How to apply patch (PSU) in Oracle Enterprise Manager 13c
Category: Database Author: Leonardo Santos Lopes Date: 5 years ago Comments: 0

How to apply patch (PSU) in Oracle Enterprise Manager 13c

Today in this article I will show you how to apply patch (PSU) in Oracle Enterprise Manager 13c (OEM13c).

 

Before start:
export ORACLE_HOME=/u01/software/em/middleware

export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/OMSPatcher
 
1 – Download the latest PSU in the MOS (My Oracle Support) and upload the .zip file to the OMS server:

 

– Enterprise Manager 13.2 Master Bundle Patch List (Includes Plugins: 13.2.1, 13.2.2, 13.2.3) (Doc ID 2219797.1)
 
2 – Download the required OPatch and OMSPatcher version as describe in the README of the PSU: (13.9.0.0.0)
 
OPatch:
https://updates.oracle.com/download/6880880.html

 

OMSPatcher:
– Patch 19999993: OMSPatcher patch of version 13.8.0.0.2 for Enterprise Manager Cloud Control 13.2.0.0.0
 
3 – Unzip the patch for the OPatch and apply:
unzip p6880880_139000_Generic.zip -d /home/oracle/6880880
 
cd /home/oracle/6880880
 
$ORACLE_HOME/oracle_common/jdk/bin/java -jar /home/oracle/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME

 

4 – Unzip the new OMSPatcher version:
unzip p19999993_132000_Generic.zip -d /home/oracle/OMSPatcher/
 
mv /home/oracle/OMSPatcher/ /u01/software/em/middleware/
 
mv /u01/software/em/middleware/OMSPatcher/
 
/u01/software/em/middleware/OMSPatcher_old20180427

 

5 – Validate the OPatch and OMSPatcher version:
  $ORACLE_HOME/OPatch/opatch version



e.g.:
OPatch Version: 13.9.3.2.0

OPatch succeeded.
 
$ORACLE_HOME/OMSPatcher/omspatcher version



e.g.:
OMSPatcher Version: 13.8.0.0.2

 OPlan Version: 12.2.0.1.6

 OsysModel build: Wed Mar 21 18:20:48 PDT 2018

 OMSPatcher succeeded.

 

6 – Apply patch in the OPatch agent:
export ORACLE_HOME=/u01/software/em/agent/agent_13.2.0.0.0
 
$ORACLE_HOME/jdk/bin/java -jar /home/oracle/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME
 
$ORACLE_HOME/OPatch/opatch version



e.g.:
OPatch Version: 13.9.3.2.0

OPatch succeeded.
7 – Generating the property file:
export ORACLE_HOME=/u01/software/em/middleware
 
cd $ORACLE_HOME/OMSPatcher/wlskeys
 
$ORACLE_HOME/OMSPatcher/wlskeys/createkeys.sh -oh $ORACLE_HOME -location
 
$ORACLE_HOME/OMSPatcher/wlskeys

 

PS: You will be prompted to enter the credentials for the user: weblogic (Admin Server)

 

8 – Unzip the file and check prerequisites, as oracle:
unzip p27612395_132000_Generic.zip -d /home/oracle/27612395
 
cd /home/oracle/27612395
 
omspatcher apply -analyze -property_file /u01/software/em/middleware/OMSPatcher/wlskeys/properties OMSPatcher.OMS_DISABLE_HOST_CHECK=true

 

PS: DO NOT copy and paste the “omspatcher” command, it does not support. You must type each command manually.

 

9 – Stopping and Applying the patch in the OMS Server:
$ORACLE_HOME/bin/emctl stop oms
 
omspatcher apply -property_file /u01/software/em/middleware/OMSPatcher/wlskeys/properties OMSPatcher.OMS_DISABLE_HOST_CHECK=true

 

10 – Start OMS Server after apply patch:
$ORACLE_HOME/bin/emctl start oms

 

 

 

 

See you in the next post!
 

 

Leonardo Santos Lopes – https://leonardosantoslopes.wordpress.com/
 

 

   

 Disclaimer: “The postings on this site are my own and don’t necessarily represent may actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications was removed to allow reach generic audience and to be useful.”


Query the last patch applied on database 11g, 12cR1, 12cR2 and 18c
Category: Database Author: Rodrigo Mufalani (Board Member) Date: 5 years ago Comments: 0

Query the last patch applied on database 11g, 12cR1, 12cR2 and 18c

 
 
Part of DBA routine is patch databases by quarterly, what is that means? 
 
It means that Oracle is a software and it is hard to hear, but Oracle database has bugs and secutiry vulnerabilities, so is good idea patch regularly your production databases with RU and RUR, you can
find more information about this change on nomenclature that occurred on 12cR2 at this of link on blog of the master https://mikedietrichde.com/2017/11/07/ru-rur-recommendations-facts/
So, usually a patch came with 2 different parts, first part is the binaries (libraries, programs and etc), you must be familiar with opatch utility to apply a patch on the Oracle Home, and the second part is the data dictionary corrections. 
To execute this part, since Oracle version 12cR1 we use datapatch to apply, this tool is amazing, really like to use it. So, the datapatch utility, is part of OPatch and the purpose of usage of this tool is apply scripts against Oracle data dictionary.
In this article I will show to you, how to query the correct views on the database to find informations about 11g, and 12c (family) databases, let’s say like that.
 
So, on version 11g, after apply a PSU patch on database, after run the script catbundle.sql, you can query this view with SYS account, to check information about the past PSUs applied:

— 11g version

set lin 1000
col action form a12
col version form a40
col comments form a70
col action_date form a20

select comments, action, to_char(action_time,’DD/MM/RR HH24:MI:SS’) action_date, version
from registry$history
order by action_date;

COMMENTS ACTION ACTION_DATE VERSION
———————————————————————- ———— ——————– —————————————-
Patch applied from 18.1.0.0.0 to 18.3.0.0.0 RU_APPLY 20/03/19 14:36:26 18.0.0.0.0
OJVM RU post-install APPLY 20/03/19 14:37:42 18.3.0.0.180717OJVMRU
RAN jvmpsu.sql jvmpsu.sql 20/03/19 14:37:42 18.3.0.0.180717OJVMRU
RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627 BOOTSTRAP 18

 

For the version 12R1 and onwards you will need to use another view and depending against wich version are running you can filter by PSU ou RELEASE words on column description:
 

— For 12c and 18c
set lin 1000
col action form a12
col version form a40
col description form a85
col action_date form a20

select description, action, to_char(action_time,’DD/MM/RR HH24:MI:SS’) action_date, ‘ ‘ version
from dba_registry_sqlpatch;

DESCRIPTION ACTION ACTION_DATE VERSION
————————————————————————————- ———— ——————– —————————————-
Database Release Update : 18.3.0.0.180717 (28090523) APPLY 20/03/19 14:37:46
OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415) APPLY 20/03/19 14:37:46

 

Obs.: There is no more version column, I keep that just for have compatibility with some old scripts.
 

To query:
— 12cR1
where upper(description) like ‘DATABASE PSU%’;

— 12cR2 onwards
where upper(descrition) like ‘DATABASE RELEASE%’;

 

I hope this brief note can help you to find more details how to query and check if the version applied on binaries matches the version of the database level of patch.
 

Disclaimer: “The postings on this site are my own and don’t necessarily represent may actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications was removed to allow reach generic audience and to be useful.”

All the best,
Rodrigo Mufalani