How to know whether patches applied to database

There are several ways to identify whether a patch applied to database. I am describing some of them.

1)By invoking $ o patch ls inventory.
Note that before invoking opatch you have to set or export ORACLE_HOME and then change the directory to opatch.
oracle:/home/oracle APPS> $ opatch lsinventory
Invoking OPatch 10.2.0.4.3

Oracle Interim Patch Installer version 10.2.0.4.3
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home : /APPS/app/oracle/product/10.2.0/db
Central Inventory : /APPS/app/oracle/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.4.3
OUI version : 10.2.0.4.0
OUI location : /APPS/app/oracle/product/10.2.0/db/oui
Log file location : /APPS/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-01-07_00-19-28AM.log

Lsinventory Output file location : /APPS/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2010-01- 07_00-19-28AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 2 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------

OPatch succeeded.
2)By invoking $ opatch lsinventory -details
 
oracle:/APPS/app/oracle/product/10.2.0/db/OPatch AHDP> $ opatch lsinventory -details
Invoking OPatch 10.2.0.4.3

Oracle Interim Patch Installer version 10.2.0.4.3
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /APPS/app/oracle/product/10.2.0/db
Central Inventory : /APPS/app/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.4.3
OUI version       : 10.2.0.4.0
OUI location      : /APPS/app/oracle/product/10.2.0/db/oui
Log file location : /APPS/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/opatch2010-01-07_00-26-17AM.log

Lsinventory Output file location : /APPS/app/oracle/product/10.2.0/db/cfgtoollogs/opatch/lsinv/lsinventory2010-01-07_00-26-17AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
There are 2 products installed in this Oracle Home.


Installed Products (160):

Agent Required Support Files                                         10.2.0.1.0
Agent Required Support Files Patch                                   10.2.0.4.0
Assistant Common Files                                               10.2.0.1.0
Assistant Common Files Patch                                         10.2.0.4.0
Bali Share                                                           1.1.18.0.0
Buildtools Common Files                                              10.2.0.1.0
Character Set Migration Utility                                      10.2.0.1.0
Character Set Migration Utility Patch                                10.2.0.4.0
Database Configuration and Upgrade Assistants                        10.2.0.1.0
Database Configuration and Upgrade Assistants Patch                  10.2.0.4.0
Database SQL Scripts                                                 10.2.0.1.0
Database SQL Scripts Patch                                           10.2.0.4.0
Database Workspace Manager                                           10.2.0.1.0
Database Workspace Manager                                           10.2.0.4.0
DBJAVA Required Support Files                                        10.2.0.1.0
DBJAVA Required Support Files Patch                                  10.2.0.4.0
Enterprise Manager Baseline                                          10.2.0.1.0
Enterprise Manager Baseline                                          10.2.0.4.0
Enterprise Manager Minimal Integration                               10.2.0.1.0
Enterprise Manager plugin Common Files                               10.2.0.1.0
Generic Connectivity Common Files                                    10.2.0.1.0
Generic Connectivity Common Files Patch                              10.2.0.4.0
HAS Common Files                                                     10.2.0.1.0
HAS Common Files Patch                                               10.2.0.4.0
HAS Files for DB                                                     10.2.0.1.0
HAS Files for DB Patch                                               10.2.0.4.0
Installation Common Files                                            10.2.0.1.0
Installation Common Files Patch                                      10.2.0.4.0
Installer SDK Component                                              10.2.0.4.0
Java Runtime Environment                                             1.4.2.14.0
JDBC Common Files                                                    10.2.0.1.0
JDBC Common Files                                                    10.2.0.4.0
LDAP Required Support Files                                          10.2.0.1.0
LDAP Required Support Files Patch                                    10.2.0.4.0
OLAP SQL Scripts                                                     10.2.0.1.0
OLAP SQL Scripts Patch                                               10.2.0.4.0
Oracle Call Interface (OCI)                                          10.2.0.1.0
Oracle Call Interface (OCI) Patch                                    10.2.0.4.0
Oracle Clusterware RDBMS Files                                       10.2.0.1.0
Oracle Clusterware RDBMS Files Patch                                 10.2.0.4.0
Oracle Code Editor                                                   1.2.1.0.0I
Oracle Configuration Manager                                         10.2.7.1.0
Oracle Containers for Java                                           10.2.0.1.0
Oracle Containers for Java                                           10.2.0.4.0
Oracle Core Required Support Files                                   10.2.0.1.0
Oracle Core Required Support Files Patch                             10.2.0.4.0
Oracle Data Mining RDBMS Files                                       10.2.0.1.0
Oracle Data Mining RDBMS Files Patch                                 10.2.0.4.0
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10G 32 bit                                           10.1.0.2.0
Oracle Database 10g interMedia Files                                 10.2.0.1.0
Oracle Database 10g interMedia Files Patch                           10.2.0.4.0
Oracle Database 10g Patch                                            10.2.0.4.0
Oracle Database 10g Patch                                            10.2.0.4.0
Oracle Database 10g Release 2 Patch Set 3                            10.2.0.4.0
Oracle Database User Interface                                       2.2.13.0.0
Oracle Database Utilities                                            10.2.0.1.0
Oracle Database Utilities Patch                                      10.2.0.4.0
Oracle Display Fonts                                                  9.0.2.0.0
Oracle Extended Windowing Toolkit                                    3.4.38.0.0
Oracle Globalization Support                                         10.2.0.1.0
Oracle Globalization Support Patch                                   10.2.0.4.0
Oracle Help For Java                                                  4.2.6.1.0
Oracle Ice Browser                                                    5.2.3.6.0
Oracle interMedia                                                    10.2.0.1.0
Oracle interMedia Annotator                                          10.2.0.1.0
Oracle interMedia Client Option                                      10.2.0.1.0
Oracle interMedia Client Option Patch                                10.2.0.4.0
Oracle interMedia Java Advanced Imaging                              10.2.0.1.0
Oracle interMedia Java Advanced Imaging Patch                        10.2.0.4.0
Oracle interMedia Locator                                            10.2.0.1.0
Oracle interMedia Locator Patch                                      10.2.0.4.0
Oracle interMedia Locator RDBMS Files                                10.2.0.1.0
Oracle interMedia Locator RDBMS Files Patch                          10.2.0.4.0
Oracle interMedia Patch                                              10.2.0.4.0
Oracle Internet Directory Client                                     10.2.0.1.0
Oracle Internet Directory Client Patch                               10.2.0.4.0
Oracle Java Client                                                   10.2.0.1.0
Oracle Java Client Patch                                             10.2.0.4.0
Oracle JDBC Thin Driver for JDK 1.2                                  10.2.0.1.0
Oracle JDBC Thin Driver for JDK 1.2 Patch                            10.2.0.4.0
Oracle JDBC Thin Driver for JDK 1.4                                  10.2.0.1.0
Oracle JDBC Thin Driver for JDK 1.4 Patch                            10.2.0.4.0
Oracle JDBC/OCI Instant Client                                       10.2.0.1.0
Oracle JDBC/OCI Instant Client Patch                                 10.2.0.4.0
Oracle JFC Extended Windowing Toolkit                                4.2.33.0.0
Oracle JVM                                                           10.2.0.1.0
Oracle JVM Patch                                                     10.2.0.4.0
Oracle LDAP administration                                           10.2.0.1.0
Oracle LDAP administration patch                                     10.2.0.4.0
Oracle Locale Builder                                                10.2.0.1.0
Oracle Message Gateway Common Files                                  10.2.0.1.0
Oracle Message Gateway Common Files Patch                            10.2.0.4.0
Oracle Net                                                           10.2.0.1.0
Oracle Net Listener                                                  10.2.0.1.0
Oracle Net Listener Patch                                            10.2.0.4.0
Oracle Net Patch                                                     10.2.0.4.0
Oracle Net Required Support Files                                    10.2.0.1.0
Oracle Net Required Support Files Patch                              10.2.0.4.0
Oracle Net Services                                                  10.2.0.1.0
Oracle Notification Service                                          10.1.0.3.0
Oracle Notification Service Patch                                    10.2.0.4.0
Oracle One-Off Patch Installer                                       10.2.0.4.0
Oracle Programmer                                                    10.2.0.1.0
Oracle RAC Required Support Files-HAS                                10.2.0.1.0
Oracle RAC Required Support Files-HAS Patch                          10.2.0.4.0
Oracle Real Application Testing                                      10.2.0.4.0
Oracle Recovery Manager                                              10.2.0.1.0
Oracle Recovery Manager Patch                                        10.2.0.4.0
Oracle Required Support Files 32 bit                                 10.2.0.0.0
Oracle Required Support Files 32 bit Patch                           10.2.0.4.0
Oracle Starter Database                                              10.2.0.1.0
Oracle Starter Database Patch                                        10.2.0.4.0
Oracle Text                                                          10.2.0.1.0
Oracle Text Patch                                                    10.2.0.4.0
Oracle UIX                                                           2.1.22.0.0
Oracle Universal Installer                                           10.2.0.4.0
Oracle Wallet Manager                                                10.2.0.1.0
Oracle Wallet Manager Patch                                          10.2.0.4.0
Oracle XML Development Kit                                           10.2.0.1.0
Oracle XML Development Kit Patch                                     10.2.0.4.0
Parser Generator Required Support Files                              10.2.0.1.0
Perl Interpreter                                                      5.8.3.0.1
PL/SQL                                                               10.2.0.1.0
PL/SQL                                                               10.2.0.4.0
PL/SQL Embedded Gateway                                              10.2.0.1.0
PL/SQL Embedded Gateway Patch                                        10.2.0.4.0
Platform Required Support Files                                      10.2.0.1.0
Platform Required Support Files                                      10.2.0.4.0
Precompiler Common Files                                             10.2.0.1.0
Precompiler Common Files Patch                                       10.2.0.4.0
Precompiler Required Support Files                                   10.2.0.1.0
Precompiler Required Support Files Patch                             10.2.0.4.0
RDBMS Required Support Files                                         10.2.0.1.0
RDBMS Required Support Files for Instant Client                      10.2.0.1.0
RDBMS Required Support Files for Instant Client Patch                10.2.0.4.0
RDBMS Required Support Files Patch                                   10.2.0.4.0
regexp                                                                2.1.9.0.0
Required Support Files                                               10.2.0.1.0
Sample Schema Data                                                   10.2.0.1.0
Sample Schema Data Patch                                             10.2.0.4.0
Secure Socket Layer                                                  10.2.0.1.0
Secure Socket Layer Patch                                            10.2.0.4.0
SQL*Plus                                                             10.2.0.1.0
SQL*Plus                                                             10.2.0.4.0
SQL*Plus Required Support Files                                      10.2.0.1.0
SQL*Plus Required Support Files Patch                                10.2.0.4.0
SQLJ Runtime                                                         10.2.0.1.0
SQLJ Runtime Patch                                                   10.2.0.4.0
SSL Required Support Files for InstantClient                         10.2.0.1.0
SSL Required Support Files for InstantClient Patch                   10.2.0.4.0
Sun JDK                                                              1.4.2.13.0
Sun JDK extensions                                                    9.0.4.0.0
XDK Required Support Files                                           10.2.0.1.0
XDK Required Support Files Patch                                     10.2.0.4.0
XML Parser for Java                                                  10.2.0.1.0
XML Parser for Java Patch                                            10.2.0.4.0
XML Parser for Oracle JVM                                            10.2.0.1.0
XML Parser for Oracle JVM Patch                                      10.2.0.4.0
There are 160 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------

OPatch succeeded.

3)Login to oracle as sys user and invoke select * from sys.registry$history;

 
SQL> select * from sys.registry$history; 
 
ACTION_TIME ACTION NAMESPACE
------------------------------- ------------------------------ ------------------------------
VERSION ID COMMENTS BUNDLE_SERIES
------------------------------ ---------- ------------------------------------ ------------------------------
30-JUL-08 05.43.41.290171 PM CPU
6452863 view recompilation

08-SEP-08 08.22.59.110066 PM CPU SERVER
10.2.0.3.0 6864068 CPUApr2008

05-AUG-09 07.08.18.158451 AM UPGRADE SERVER
10.2.0.4.0 Upgraded from 10.2.0.3.0

05-AUG-09 07.42.03.040347 AM CPU
6452863 view recompilation
4)Various OS Commands.
$ showrev -p
$ owhat bin/oracle

From all the ways described above we can get idea whether patches are applied to database.

No comments:

ORA-01552: cannot use system rollback segment for non-system tablespace 'TEMP'

 ORA-01552: cannot use system rollback segment for non-system tablespace "string" Cause: Used the system rollback segment for non...