Wednesday 30 March 2016

Opatch interview questions in oracle database

1. What is Opactch in Oracle?
The Opatch utility is a tool that allows the application and rollback of interim patches to Oracle products. This chapter provides information on using Opatch to apply patches.

2. Opatch options and description?
* apply: Installs an interim patch. Refer to "apply Command" for more information.
* napply:  Installs n number of patches (hence napply). Refer to "napply Command" for more     information.
* auto: Applies Oracle Clusterware patches. Refer to "auto Command" for more information.
* lsinventory: Lists what is currently installed on the system. Refer to "lsinventory Command" for more information.
* query: Queries a given patch for specific details. Refer to "query Command" for more information.
* rollback: Removes an interim patch. Refer to "rollback Command" for more information.
* version: Prints the current version of the patch tool. Refer to "version Command" for more information.

3. What are the features of opatch?
* Scalability: Opatch is scalable to support a large number of patches.
* Reliability: Opatch is reliable and protects the Oracle home and inventory. It can bring back the Oracle home to a stable state from patch application failures. It can also easily detect patch conflicts.
* Availability: Opatch's online patching improves system availability by allowing database patches   to be applied without needing to shut down databases.
* Portability: Opatch is compatible with all operating systems for which Oracle releases software.
* Robust: Opatch is very robust. It is very easy to apply a patch as well as remove it.
* Easy to maintain: Opatch is easy to maintain and is also extensible.
* Support for Silent Operation: Opatch supports silent operation. This mode allows you to run the software without any user interaction.
* Support for Real Application Clusters: Opatch supports RAC and works well in that setup. It is easy to extend it to Enterprise Manager Grid   Control.
* Easy to debug: Opatch has various levels of logging and tracing mechanisms. It also has a debug option that helps to easily diagnose software problems.

Opatch supports the following tasks:
Applying an interim patch.
Rolling back the application of an interim patch.
Detecting a conflict when applying an interim patch after previous interim patches have been applied. It also suggests the best options to resolve a conflict.
Reporting on installed products and interim patches.

4. What is CPU patch?
Critical Patch Update (CPU) - Release of security fixes each quarter instead the cumulative database security patch for the quarter.

5. What is PSU patch?
Patch Set Updates (PSU) - Cumulative patches that include both the security fixes and priority fixes. They are "version upgrades" modifying the las number of version (11.2.0.1.1, 11.2.0.1.2,...).

6. What is SPU patch?
Security Patch Update (SPU) - It is the new terminology of CPU (From October 2012) . SPU's can't be applied if any PSU's have been applied, unless your database is upgraded with a new base version.

7. In which months oracle release CPU patches?
JAN, APR, JUL, OCT

8. When we applying single Patch, can you use opatch utility?
Yes, we can use Opatch incase of single patch. The only type of patch that can't be used with OPatch is a patchset.

9. Is it possible to apply OPATCH without downtime?
As you know for apply patch your database and listener must be down. When you apply OPTACH it will update your current ORACLE_HOME. Thus coming to your question to the point in fact it is not possible without or zero downtime in case of single instance but in RAC you can Apply Opatch without downtime as there will be more separate ORACLE_HOME and more separate instances (running once instance on each ORACLE_HOME).

10. You have collection of patch (nearly 100 patches) or patchset. How can you apply only one patch from it?
With Napply itself (by providing patch location and specific patch id) you can apply only one patch from a collection of extracted patch. For more information check the opatch util NApply –help. It will give you clear picture.
For Example:
opatch util napply <patch_location> -id 9 -skip_subset -skip_duplicate
This will apply only the patch id 9 from the patch location and will skip duplicate and subset of patch installed in your ORACLE_HOME.

11. How to Apply Opatch in Oracle?
* You MUST read the Readme.txt file included in opatch file, look for any prereq. steps/ post installation steps or and DB related changes. Also, make sure that you have the correct opatch version required by this patch.
* Make sure you have a good backup of database.
* Make a note of all Invalid objects in the database prior to the patch.
* Shutdown All the Oracle Processes running from that Oracle Home , including the Listener and Database instance, Management agent etc.
* You MUST Backup your oracle Home and Inventory
  tar -cvf $ORACLE_HOME $ORACLE_HOME/oraInventory | gzip > Backup_Software_Version.tar.gz
* Unzip the patch in $ORACLE_HOME/patches
* cd to the patch direcory and do opatch -apply to apply the patch.
* Read the output/log file to make sure there were no errors.
* Log file location : /d02/oracle/ebs12/db/tech_st/11.2.0.3.0/cfgtoollogs/opatch/opatch2016-03-30_21-41-45PM_1.log

12. Oracle version 11.2.0.1.0 what does each number refers to?
  Oracle version number refers:
  11 - Major database release number
   2 - Database Maintenance release number
   0 - Application server release number
   1 - Component Specific release number
   0 - Platform specific release number

No comments:

Post a Comment