Patch History

The table REGISTRY$HISTORY contains information on applied patches respectively PSU, SRU or CPU.

SET linesize 300 pagesize 200
col action_time FOR a28
col version FOR a10
col comments FOR a35
col action FOR a25
col namespace FOR a12
SELECT * FROM registry$history;

   **********************************************************************************************************
Cloning An Existing Oracle Database 12c Release 1 (12.1.0.x) RDBMS Installation Using OUI (Doc ID 1493677.1)

1. cd /udd001/app/oracle/product/12.2.0.1.180717

2. tar -cvf /tmp/source.tar .

3. mv /tmp/source.tar /udd001/app/oracle/product

4. cp -Rp /udd001/app/oracle/product/12.2.0.1.180717 /udd001/app/oracle/product/12.2.0.1.190716

5. cd /udd001/app/oracle/product/12.2.0.1.190716/oui/bin

6. ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/udd001/app/oracle/product/12.2.0.1.190716" ORACLE_HOME_NAME="OraDB12Home2" ORACLE_BASE="/udd001/app/oracle" oracle_install_OSDBA=dba oracle_install_OSOPER=dba


pluto:/udd001/app/oracle/product/12.2.0.1.190716/oui/bin abcdev01 0:40:38 $ ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/udd001/app/oracle/product/12.2.0.1.190716" ORACLE_HOME_NAME="OraDB12Home2" ORACLE_BASE="/udd001/app/oracle" oracle_install_OSDBA=dba oracle_install_OSOPER=dba
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 23094 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-05-18_01-09-48PM. Please wait ...pluto:/udd001/app/oracle/product/12.2.0.1.190716/oui/bin abcdev01 0:41:50 $ Oracle Universal Installer, Version 12.2.0.1.4 Production
Copyright (C) 1999, 2016, Oracle. All rights reserved.

You can find the log of this install session at:
 /udd001/app/oracle/oraInventory/logs/cloneActions2020-05-18_01-09-48PM.log
.................................................................................................... 100% Done.



Installation in progress (Monday, May 18, 2020 1:10:00 PM SAST)
............................................................................                                                    76% Done.
Install successful

Linking in progress (Monday, May 18, 2020 1:10:07 PM SAST)
.                                                                77% Done.
Link successful

Setup in progress (Monday, May 18, 2020 1:10:58 PM SAST)
.............                                                   100% Done.
Setup successful

Saving inventory (Monday, May 18, 2020 1:10:58 PM SAST)
Saving inventory complete
Configuration complete

End of install phases.(Monday, May 18, 2020 1:11:30 PM SAST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/udd001/app/oracle/product/12.2.0.1.190716/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

The cloning of OraDB12Home2 was successful.
Please check '/udd001/app/oracle/oraInventory/logs/cloneActions2020-05-18_01-09-48PM.log' for more details.

--------------------------------------------

$ORACLE_HOME/bin/diagsetup basedir=/oracle/app/oracle oraclehome=/oracle/app/oracle/product/12.1.0.2_clone/dbhome_1

**********************************************************************************************************

stop the listener and shutdown the database 
edit the ORATAB with the new Oracle home

db=pfilen
ORACLE_SID=${db};export ORACLE_SID;ORAENV_ASK=NO;export ORAENV_ASK;. oraenv
echo $ORACLE_HOME

cd $ORACLE_HOME/network/admin
ln -s /udd001/app/oracle/admin/sqlnet/listener.ora
ln -s /udd001/app/oracle/admin/sqlnet/tnsnames.ora
ln -s /udd001/app/oracle/admin/sqlnet/sqlnet.ora

cd $ORACLE_HOME/dbs
ln -s /udd001/app/oracle/admin/${db}/pfile/init${db}.ora
ln -s /udd001/app/oracle/admin/${db}/pfile/spfile${db}.ora
ln -s /udd001/app/oracle/admin/${db}/pfile/orapw${db}

Note: Rename existing files like so:

pluto:/udd001/app/oracle/product/12.2.0.1.190716/dbs abcdev01 0:20:54 $ ls -l *.o
-rwxr-xr-x   1 oracle   dba          769 Jul  9  2019 initabcdev01.ora.o
-rw-r-----   1 oracle   dba         4608 Apr 26  2019 orapwabcdev01.o
-rw-r-----   1 oracle   dba         3584 Jan 12 17:00 spfileabcdev01.ora.o


pluto:/udd001/app/oracle/product/12.2.0.1.190716/network/admin abcdev01 0:21:32 $ ls -l *.o
-rw-r--r--   1 oracle   dba         1554 Jun 11  2019 listener.ora.o
-rw-r--r--   1 oracle   dba          495 May 27  2019 sqlnet.ora.o
-rw-r--r--   1 oracle   dba         1344 Jun 14  2019 tnsnames.ora.o



******************************************************************************************************************
******************************************************************************************************************
0. Stop DB and listener

1. Unzip zip file in patch directory 

2. cd 29757449 

3. issue command $ORACLE_HOME/OPatch/opatch apply

4. Type 'Y" to confirm

5. Type "Y" to confirm local system ready for patching

6. Confirm patch installed $ORACLE_HOME/OPatch/opatch lsinventory

7. Start up DB

8. cd $ORACLE_HOME/OPatch

9. $ ./datapatch -verbose

10. SQL> select * from dba_registry_sqlpatch;

11. Startup listener

******************************************************************************************************************


OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: WARNING: can't change /udd001/app/oracle/product/12.2.0.1.190716/bin/extjobO



OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
+ PATH=/bin:/usr/bin:/usr/ccs/bin
+ export PATH
+ lib=/udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/libsqlplus.so
+ makefile=/udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/ins_sqlplus.mk
+ so_ext=so
+ target=dlopenlib
+ basename /udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/libsqlplus.so .so
+ libname=libsqlplus
+ dirname /udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/libsqlplus.so
+ sodir=/udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib
+ ardir=/udd001/app/oracle/product/12.2.0.1.190716/lib/
+ [ var '=' dlopenlib ]
+ suffix=LIBS
+ var=''
+ [ ! -f /udd001/app/oracle/product/12.2.0.1.190716/lib/libsqlplus.a ]
+ [ '' '!=' '' ]
+ make -f /udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/ins_sqlplus.mk dlopenlib _FULL_LIBNAME=/udd001/app/oracle/product/12.2.0.1.190716/sqlplus/lib/libsqlplus.so _LIBNAME=libsqlplus _LIBDIR=/udd001/app/oracle/product/12.2.0.1.190716/lib/ _LIBNAME_LIBS='$(libsqlplusLIBS)' _LIBNAME_EXTRALIBS='$(libsqlplusEXTRALIBS)'
ld: warning: symbol '_init' not found, but .init section exists - possible link-edit without using the compiler driver
ld: warning: symbol '_fini' not found, but .fini section exists - possible link-edit without using the compiler driver


Patch 29757449 successfully applied.
Sub-set patch [29314339] has become inactive due to the application of a super-set patch [29757449].
Please refer to Doc ID 2161861.1 for any possible further required actions.
OPatch Session completed with warnings.
Log file location: /udd001/app/oracle/product/12.2.0.1.190716/cfgtoollogs/opatch/opatch2020-05-18_17-33-29PM_1.log

OPatch completed with warnings.


******************************************************************************************************************
pluto:/udd001/app/oracle/product/12.2.0.1.190716/bin abcdev01 1:26:3 $ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /udd001/app/oracle/product/12.2.0.1.190716
Central Inventory : /udd001/app/oracle/oraInventory
   from           : /udd001/app/oracle/product/12.2.0.1.190716/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.1.4
Log file location : /udd001/app/oracle/product/12.2.0.1.190716/cfgtoollogs/opatch/opatch2020-05-18_18-06-40PM_1.log

Lsinventory Output file location : /udd001/app/oracle/product/12.2.0.1.190716/cfgtoollogs/opatch/lsinv/lsinventory2020-05-18_18-06-40PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: pluto
ARU platform id: 23
ARU platform description:: Solaris Operating System (SPARC 64-bit)


Installed Top-level Products (1):

Oracle Database 12c                                                  12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (2) :

Patch  29757449     : applied on Mon May 18 17:36:03 SAST 2020
Unique Patch ID:  23015023
Patch description:  "Database Jul 2019 Release Update : 12.2.0.1.190716 (29757449)"
   Created on 12 Jul 2019, 02:03:02 hrs PST8PDT

  pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:1:4 $ opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.
pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:1:8 $ echo $ORACLE_HOME
/udd001/app/oracle/product/12.2.0.1.190716
pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:1:26 $ export PATH=$PATH:/usr/ccs/bin
pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:2:59 $
pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:2:59 $
pluto:/udd001/app/oracle/product/12.2.0.1.190716/OPatch abcdev01 0:2:59 $ cd
pluto:/udd001/app/oracle abcdev01 0:3:36 $ cd software
/udd001/app/oracle/software
pluto:/udd001/app/oracle/software abcdev01 0:3:41 $ ls -lrt
total 6463533
drwxr-xr-x   2 oracle   dba            6 Jan  8  2015 DBMS_DST_scriptsV1.9
drwxr-xr-x   7 oracle   dba            9 Feb  1  2017 database
drwxr-xr-x   3 oracle   dba            7 Aug 17  2018 11gJulyPatches
drwx------   4 oracle   dba            4 Aug 22  2018 12.2_180717_Patches
-rw-------   1 oracle   dba      3306204620 Aug 23  2018 solarissparc64_12201_database.zip
drwxr-xr-x   3 oracle   dba            4 Aug 23  2018 Latest_Opatch
-rw-------   1 oracle   dba        24612 Aug 24  2018 dbupgdiag.sql
-rw-------   1 oracle   dba        16043 Aug 24  2018 DBMS_DST_scriptsV1.9.zip
-rw-------   1 oracle   dba         1122 Aug 30  2018 nohup.out
-rw-r--r--   1 oracle   dba       358361 May 18 14:37 p25299069_12201190716DBJUL2019RU_SOLARIS64.zip
drwxr-xr-x   3 oracle   dba            5 May 18 17:32 PSU_12.2.0.1.190716
pluto:/udd001/app/oracle/software abcdev01 0:3:42 $ unzip p25299069_12201190716DBJUL2019RU_SOLARIS64.zip
Archive:  p25299069_12201190716DBJUL2019RU_SOLARIS64.zip
   creating: 25299069/
   creating: 25299069/etc/
   creating: 25299069/etc/config/
  inflating: 25299069/etc/config/inventory.xml
  inflating: 25299069/etc/config/actions.xml
  inflating: 25299069/README.txt
   creating: 25299069/files/
   creating: 25299069/files/lib/
   creating: 25299069/files/lib/libgeneric12.a/
  inflating: 25299069/files/lib/libgeneric12.a/kgh.o
  inflating: PatchSearch.xml
pluto:/udd001/app/oracle/software abcdev01 0:3:56 $
pluto:/udd001/app/oracle/software abcdev01 0:3:56 $
pluto:/udd001/app/oracle/software abcdev01 0:3:56 $
pluto:/udd001/app/oracle/software abcdev01 0:3:56 $
pluto:/udd001/app/oracle/software abcdev01 0:3:56 $
pluto:/udd001/app/oracle/software abcdev01 0:3:57 $
pluto:/udd001/app/oracle/software abcdev01 0:3:57 $ ls -lrt
total 6463546
drwxr-xr-x   2 oracle   dba            6 Jan  8  2015 DBMS_DST_scriptsV1.9
drwxr-xr-x   7 oracle   dba            9 Feb  1  2017 database
drwxr-xr-x   3 oracle   dba            7 Aug 17  2018 11gJulyPatches
drwx------   4 oracle   dba            4 Aug 22  2018 12.2_180717_Patches
-rw-------   1 oracle   dba      3306204620 Aug 23  2018 solarissparc64_12201_database.zip
drwxr-xr-x   3 oracle   dba            4 Aug 23  2018 Latest_Opatch
-rw-------   1 oracle   dba        24612 Aug 24  2018 dbupgdiag.sql
-rw-------   1 oracle   dba        16043 Aug 24  2018 DBMS_DST_scriptsV1.9.zip
-rw-------   1 oracle   dba         1122 Aug 30  2018 nohup.out
-rw-r--r--   1 oracle   dba         4512 Sep  1  2019 PatchSearch.xml
-rw-r--r--   1 oracle   dba       358361 May 18 14:37 p25299069_12201190716DBJUL2019RU_SOLARIS64.zip
drwxr-xr-x   3 oracle   dba            5 May 18 17:32 PSU_12.2.0.1.190716
drwxr-xr-x   4 oracle   dba            5 May 19 14:46 25299069
pluto:/udd001/app/oracle/software abcdev01 0:4:2 $ cd 25299069
/udd001/app/oracle/software/25299069
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:4:5 $ sqla

SQL*Plus: Release 12.2.0.1.0 Production on Tue May 19 14:47:26 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:5:20 $ ps -ef | grep tns
  oracle  4232     1   0   Nov 14 ?         389:51 /udd001/app/oracle/product/12.2.0.1.180717/bin/tnslsnr publistener_abcdev02 -inherit
  oracle  6555     1   0 18:24:16 ?           0:39 /udd001/app/oracle/product/12.2.0.1.190716/bin/tnslsnr publistener_abcdev01 -inherit
  oracle 13018 12306   0 14:48:11 pts/1       0:00 grep tns
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:5:27 $ lsnrctl

LSNRCTL for Solaris: Version 12.2.0.1.0 - Production on 19-MAY-2020 14:48:19

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current publistener_abcdev01
Current Listener is publistener_abcdev01
LSNRCTL>
LSNRCTL> status
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=abcdev01.dbanet.co.za)(port=1526)))
STATUS of the LISTENER
------------------------
Alias                     publistener_abcdev01
Version                   TNSLSNR for Solaris: Version 12.2.0.1.0 - Production
Start Date                18-MAY-2020 18:24:16
Uptime                    0 days 20 hr. 24 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /udd001/app/oracle/product/12.2.0.1.190716/network/admin/listener.ora
Listener Log File         /udd001/app/oracle/diag/tnslsnr/pluto/publistener_abcdev01/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.147.135.145)(PORT=1526)))
The listener supports no services
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=abcdev01.dbanet.co.za)(port=1526)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=abcdev01.dbanet.co.za)(port=1526)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Solaris Error: 146: Connection refused
LSNRCTL> exit
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:5:52 $ ps -fu oracle | grep abcdev01
  oracle 13186 12306   0 14:48:51 pts/1       0:00 grep abcdev01
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:6:6 $ opatch apply
-bash: opatch: command not found
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:6:35 $ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /udd001/app/oracle/product/12.2.0.1.190716
Central Inventory : /udd001/app/oracle/oraInventory
   from           : /udd001/app/oracle/product/12.2.0.1.190716/oraInst.loc
OPatch version    : 12.2.0.1.17
OUI version       : 12.2.0.1.4
Log file location : /udd001/app/oracle/product/12.2.0.1.190716/cfgtoollogs/opatch/opatch2020-05-19_14-49-35PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   25299069

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/udd001/app/oracle/product/12.2.0.1.190716')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '25299069' to OH '/udd001/app/oracle/product/12.2.0.1.190716'

Patching component oracle.rdbms, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Patch 25299069 successfully applied.
Log file location: /udd001/app/oracle/product/12.2.0.1.190716/cfgtoollogs/opatch/opatch2020-05-19_14-49-35PM_1.log

OPatch succeeded.
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:7:40 $ sqla

SQL*Plus: Release 12.2.0.1.0 Production on Tue May 19 14:51:24 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size                  8604248 bytes
Variable Size            2046825896 bytes
Database Buffers           83886080 bytes
Redo Buffers                8167424 bytes
Database mounted.
Database opened.
SQL> show parmater _memory
SP2-0158: unknown SHOW option "parmater"
SP2-0158: unknown SHOW option "_memory"
SQL> show parameter _memory

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
inmemory_adg_enabled                 boolean     TRUE
inmemory_clause_default              string
inmemory_expressions_usage           string      ENABLE
inmemory_force                       string      DEFAULT
inmemory_max_populate_servers        integer     0
inmemory_query                       string      ENABLE
inmemory_size                        big integer 0
inmemory_trickle_repopulate_servers_ integer     1
percent
inmemory_virtual_columns             string      MANUAL

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
optimizer_inmemory_aware             boolean     TRUE
shared_memory_address                integer     0
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:9:32 $ ps -ef | grep tns
  oracle  4232     1   0   Nov 14 ?         389:51 /udd001/app/oracle/product/12.2.0.1.180717/bin/tnslsnr publistener_abcdev02 -inherit
  oracle 13832 12306   0 14:52:24 pts/1       0:00 grep tns
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:9:39 $ lsnrctl

LSNRCTL for Solaris: Version 12.2.0.1.0 - Production on 19-MAY-2020 14:52:26

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current publistener_abcdev01
Current Listener is publistener_abcdev01
LSNRCTL> start
Starting /udd001/app/oracle/product/12.2.0.1.190716/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 12.2.0.1.0 - Production
System parameter file is /udd001/app/oracle/product/12.2.0.1.190716/network/admin/listener.ora
Log messages written to /udd001/app/oracle/diag/tnslsnr/pluto/publistener_abcdev01/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.147.135.145)(PORT=1526)))

Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=abcdev01.dbanet.co.za)(port=1526)))
STATUS of the LISTENER
------------------------
Alias                     publistener_abcdev01
Version                   TNSLSNR for Solaris: Version 12.2.0.1.0 - Production
Start Date                19-MAY-2020 14:52:38
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /udd001/app/oracle/product/12.2.0.1.190716/network/admin/listener.ora
Listener Log File         /udd001/app/oracle/diag/tnslsnr/pluto/publistener_abcdev01/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.147.135.145)(PORT=1526)))
The listener supports no services
The command completed successfully
LSNRCTL> exit
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:9:59 $ crontab -e
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:10:37 $ crontab -e
pluto:/udd001/app/oracle/software/25299069 abcdev01 0:10:52 $

  We use cookies to optimize our website and our service. Cookie Policy - Impressum
Accept all
Functional only
View preferences
Skip to content
Upgrade your Database - NOW!
Mike Dietrich's Blog About Oracle Database Upgrades… Mostly

Blog
Slides
Hands-On Lab
Events
Papers / Docs
Videos
Scripts
Links
Oracle Documentation
Privacy
About
DBA_REGISTRY_HISTORY vs DBA_REGISTRY_SQLPATCH
Posted on November 30, 2016 by Mike.Dietrich Flaws and Pitfalls Patch Recommendation5
At the DOAG Conference in November in Nürnberg in November 2016 a customer asked me right after my talk about “Upgrade to Oracle Database 12.2. – Live and Uncensored” why the DBA_REGISTRY_HISTORY does not get updated when he applies a Bundle Patch and follows all instructions including the “./datapatch -verbose” call.

I was wondering as well and asked him to open an SR. Which he did. And he received the message from Support that it is not supposed to appear in Oracle 12c anymore this way but only in DBA_REGISTRY_SQLPATCH. Now I dug a bit deeper internally to get a clear statement (thanks to Carol (my boss) and Rae (my teammate) and Scott (the man who owns datapatch) for following up!).

Patch Query in Oracle Database 11g
Tim Hall has published this simple and quite helpful script to query applied PSUs and BPs in Oracle Database 11g:
Script to monitor DBA_REGISTRY_HISTORY

And the output in my environment looked like this:

ACTION_TIME           ACTION  NAMESPE VERSION  ID      COMMENTS             BUN
 -------------------- ------- ------- -------- ------- -------------------- ---
 01-JUL-2016 15:24:56 APPLY   SERVER  11.2.0.4 160419  PSU 11.2.0.4.160419  PSU
 21-OCT-2016 17:40:32 APPLY   SERVER  11.2.0.4 161018  PSU 11.2.0.4.161018  PSU
But running the same script on Oracle Database 12.1.0.2 returnes (as for the customer) “no rows selected“.

Patch Query for Oracle Database 12c
Since Oracle Database 12.1.0.1 we use DBA_REGISTRY_SQLPATCH instead of DBA_REGISTRY_HISTORY to track PSUs and BPs applied to the database. I used this script: check_patches.sql.

My output in Oracle Database 12.1.0.2 looks like this:

ACTION_TIME          ACTION  STATUS   DESCRIPTION          VERSION  PATCH_ID BUND
-------------------- ------- -------- -------------------- -------- -------- ----
21-OCT-2016 17:29:36 APPLY   SUCCESS  DBP: 12.1.0.2.161018 12.1.0.2 24340679 DBBP
when using this tiny script:

SET LINESIZE 400
SET PAGESIZE 100
COLUMN action_time FORMAT A20
COLUMN action FORMAT A10
COLUMN status FORMAT A10
COLUMN description FORMAT A40
COLUMN version FORMAT A10
COLUMN bundle_series FORMAT A10

SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,
 action,
 status,
 description,
 version,
 patch_id,
 bundle_series
 FROM   sys.dba_registry_sqlpatch
 ORDER by action_time;
But the question remains if – as in Oracle Database 12.1.0.1 – both views should get updated.

Explanation
In 11.2.0.4, we used the script catbundle.sql to apply bundle patches.  It uses DBA_REGISTRY_HISTORY only.  For 12.1.0.1 with the introduction of datapatch, we now have the (much better) DBA_REGISTRY_SQLPATCH.  This is used for both, bundle and non-bundle patches.  In Oracle Database 12.1.0.1. for bundle patches we actually called catbundle internally, so in 12.1.0.1 both registries were updated for bundle patches.
Starting in 12.1.0.2, however, only DBA_REGISTRY_SQLPATCH is queried and updated for bundle and non
bundle patches.

Update [Dec 23, 2016]
After discussing this and other issues with the owners of datapatch my teammate Rae logged a bug for this issue as we believe both views should be updated as it happened in 12.1.0.1. Bug# 25269268 tracks the issue.

–Mike

Share this:
 
 
Related
The OJVM Patching Saga – and how to solve it – Part IV
Related Posts on "The OJVM Patching Saga - and how to solve it": Part I - The OJVM Basics Part II - Important Notes and Information Part III - The Mitigation Patch Part IV - What you may have missed Part V - MOS Note explaining "Conditional Rolling Install"  What…

February 9, 2017

Do you have to execute catbundle.sql when you create a new 11g database?
April 25, 2018
Do you have to execute “datapatch” when you create a new database?
Thanks to Connor McDonald (Mr. AskTom) I learned today that one topic is not clear from our patches readmes: Do you have to execute "datapatch" when you create a new database? And it's true. It does not get explained in the readme anywhere. Do you have to execute "datapatch" when…

April 19, 2018
Tags: BPBundle PatchDatapatchDBA_REGISTRY_HISTORYDBA_REGISTRY_SQLPATCHIssueOne-Off PatchPatch Set UpdatePSU

NEXT
UKOUG TECH 16 is coming – and I’m speaking
PREVIOUS
Lufthansa – 14th pilot strike in 2 years – lovely :-(
Comments5
Pingbacks0
Shamik Banerjee March 9, 2020 at 18:16
Thanks ! Mike
Looks like the bundle_series is dropped in 19c, so I am using your query and modified little bit
SET LINESIZE 400
SET PAGESIZE 100
COLUMN action_time FORMAT A20
COLUMN action FORMAT A10
COLUMN status FORMAT A10
COLUMN description FORMAT A40
COLUMN source_version FORMAT A10
COLUMN target_version FORMAT A10

SELECT TO_CHAR(action_time, ‘DD-MON-YYYY HH24:MI:SS’) AS action_time,
action,
status,
description,
SOURCE_VERSION,
TARGET_VERSION,
patch_id
FROM sys.dba_registry_sqlpatch
ORDER by action_time;

Reply
Mike.Dietrich March 25, 2020 at 21:03
Thanks a lot!

Cheers,
Mike

Reply
Mike.Dietrich March 25, 2020 at 21:15
Actually the 18c /and now also 19c/ scripts had the correct sql already 🙂

Cheers,
Mike

Reply
Anuj January 2, 2021 at 10:21
Hi
I am using following sql 🙂

set lines 132 verify off head off feedback on long 1000
select distinct
‘======================================================’ ||chr(10)||
‘INSTALL ID……………..: ‘||INSTALL_ID ||Chr(10)||
‘PATCH_ID……………….: ‘||PATCH_ID ||Chr(10)||
‘PATCH UID………………: ‘||PATCH_UID ||Chr(10)||
‘PATCH TYPE……………..: ‘||PATCH_TYPE ||Chr(10)||
‘ACTION…………………: ‘||ACTION ||Chr(10)||
‘STATUS…………………: ‘||STATUS ||Chr(10)||
‘ACTION TIME…………….: ‘||ACTION_TIME ||Chr(10)||
‘DESCRIPTION…………….: ‘||DESCRIPTION ||Chr(10)||
‘FLAGS………………….: ‘||FLAGS ||Chr(10)||
‘SOURCE VERSION………….: ‘||SOURCE_VERSION ||Chr(10)||
‘SOURCE BUILD_DESCRIPTION…: ‘||SOURCE_BUILD_DESCRIPTION ||Chr(10)||
‘SOURCE BUILD_TIMESTAMP…..: ‘||SOURCE_BUILD_TIMESTAMP ||Chr(10)||
‘TARGET VERSION………….: ‘||TARGET_VERSION ||Chr(10)||
‘TARGET BUILD DESCRIPTION…: ‘||TARGET_BUILD_DESCRIPTION ||Chr(10)||
‘TARGET BUILD TIMESTAMP…..: ‘||TARGET_BUILD_TIMESTAMP ||Chr(10)
–‘LOGFILE………………..: ‘||LOGFILE ||Chr(10)||
–‘RU LOGFILE……………..: ‘||RU_LOGFILE ||Chr(10)
from dba_registry_sqlpatch
order by 1

regards
Anuj singh

Reply
Linda A Stewart April 19, 2021 at 20:21
spot on in 12c

Reply
Comment

Name *
Email *
Website

 Notify me of follow-up comments by email.

 Notify me of new posts by email.

This site uses Akismet to reduce spam. Learn how your comment data is processed.


To search type and hit enter
Archives

Select Month
Categories

Select Category
Upcoming Events
There are no upcoming events at this time.

Upgrade @YouTube

RSS Feed for Upgrade your Database – NOW!
Which releases allow you to upgrade to Oracle Database 21c?
Pitfall: Upgrade to 21c fails when ORDIM is present but no SDO
Upgrading a non-CDB to Oracle Database 21c with AutoUpgrade
Installation of Oracle Database 21c on Oracle Linux
Oracle Database 21c is available for download on Linux
Subscribe via Email
Join 5,387 other subscribers

Email Address - @oracle.com doesn't work

Subscribe

Follow me on Twitter

Recent Posts
Which releases allow you to upgrade to Oracle Database 21c?
Pitfall: Upgrade to 21c fails when ORDIM is present but no SDO
Upgrading a non-CDB to Oracle Database 21c with AutoUpgrade
Installation of Oracle Database 21c on Oracle Linux
Oracle Database 21c is available for download on Linux
Upgrade your Database – NOW! © 2021. All Rights Reserved.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy


HOME