Thursday, November 6, 2014

In Oracle Apps R12.2 what will happen when we run adop phase=prepare

 

1. Checks that the environment is set to the run APPL_TOP.

2. Checks whether to perform a cleanup, which will be needed if the user failed to invoke cleanup after the cutover phase of a previous online patching cycle.

3. Checks to see if the database is prepared for online patching:

  • Checks that the FILE_EDITION environment variable value is set to ‘run
  • Checks to see if enough space is available in the database (SYSTEM tablespace should have minimum of 25 GB of free space and APPS_TS_SEED tablespace should have minimum of 5 GB of free space)

4. Checks the file system, using the TXK script $AD_TOP/patch/115/bin/txkADOPPreparePhaseSanityCheck.pl. This script checks for the file system space, database connections, Apps/System/Weblogic Passwords, Contextfile Validation and so on

5. Produces a report showing information about the most important tablespaces is generated. This report is created in $APPL_TOP/admin/$TWO_TASK/out.

6. Checks for the existence of the “Online Patching In Progress” (ADZDPATCH) concurrent program. This program prevents certain predefined concurrent programs from being started, and as such needs to be active while a patching cycle is in progress.

7.Invokes the TXK script $AD_TOP/patch/115/bin/txkADOPPreparePhaseSynchronize.pl to synchronize the patches which have been applied to the run appltop.

8. Checks the database for the existence of a patch edition, and creates one if it does not find one

  • A patch edition is created in the database.
  • All code objects in the patch edition begin as pointers to code objects in the run edition. Code objects in the patch edition begin as lightweight “stub objects” that point to the actual object definitions, which are inherited from earlier editions. Stub objects consume minimal space, so the database patch edition is initially very small in size.
  • As patches are applied to the patch edition, code objects are actualized (have a new definition created) in that edition.

9. Calls the $AD_TOP/patch/115/bin/txkADOPPreparePhaseSanityCheck.pl script again to confirm that the database connection to the patch edition is working.
 
 
 

Wednesday, November 5, 2014

Online Patching ? ADOP AD Online Patching replaces adpatch in 12.2.



Online Patching is new feature which  is major change with R12 12.2 for DBA's , as downtime would be reduced for any patching activity from hours to few minutes.

Now it is possible to apply even upgrade patches in Online Patching mode minimizing downtime to very low, But please note upgrade to 12.2 is not possible via online patching from lower versions . 

On the technology part  of online patching, It is some what similar to Stage APPLTOP, But in online patching database objects also will maintain two copies to support this method. i.e. run file system and run edition of DB, patch file system and patch edition of DB.

In applications  contains two set of file systems patch and run file system, run is where actually applications is running from and patch is used for patching the applications when it is running. in database we have edition based concept, where we contain patch edition and run edition.

Actually the base for the online patching concept came into picture with 11GR2 database version , Where there is concept called "Edition Based Redefinition", Online patching database part is based on it.

Online Patching in 12.2. is done using adop utility (No Longer adpatch), But this utility calls internally the required patching(adpatch) or other  utilities.

and all the patches need to be applied using adop only, Other methods are not supported. But we can apply the patches in hot patch mode using adop, But in this method , The online patching concept will not come into picture , It is traditional way of applying patch directly on the run file system and run edition of the database when applications and DB is running.


Online Patching (adop) runs in different phases, The below are phases and syntax of adop.

prepare
apply
finalize
cutover
cleanup


prepare  Phase


patch edition and run editions are synchronized in incremental synchronizations of files changed in the run file system.

patch edition is created in the database

Syntax: $ adop phase=prepare

apply phase 


patches are applied to patch patch edition in the database and patch file system in the applications.

adpatch is called internally by adop to apply the patches.

production application is un effected by these changes, and multiple patches can be applied.

Syntax: $ adop phase=apply

To Apply specific patch in 12.2 using adop is :
 
$ adop phase=apply patches=17323764


finalize phase 


Performs all the activities which can be done when applications is up & running.

example: compile invalids, generate objects, pre-compile DDL

Syntax: $ adop phase=finalize


This stage we can stay as long as we want, until once we have downtime to move the changed in the cutover stage , 


cutover phase


This is a stage where actual changes reflects and downtime is required for this stage. 

Users are logged off during this stage.

patch file system is promoted to be the run file system

patch database edition is promoted to the run database edition.

users are actually brought back on online on the patched system.

Syntax: $ adop phase=cutover


cleanup phase


Cleanup happens once users online on the system


There are no cleanup on the file system , Only it happens on the database where it deletes the code objects from old editions of the database where patching happened.

Syntax: $ adop phase=cleanup


 
 
 
 
 

Tuesday, November 4, 2014

AC-00005: No write permissions for creating the Context file - /tmp/temp.xml


Error:


RC-50004: Error occurred in CloneContext:
AC-00005: No write permissions for creating the Context file - /tmp/temp.xml
Raised by oracle.apps.ad.context.AppsContext
Context file creation not successful

Sol

Apps user does  not have write permissions on /tmp directory.

1- Give write permission to apps user on "/tmp" directory.

       Example :

        As root:

        # chmod 777 /tmp

       # ls -al | grep tmp

       drwxrwxrwx     11 root root     4096 Jun 15 04:02 tmp

 2- Re-run the Postclone.

      perl adcfgclone.pl

    

The error above  is a bit misleading. adcfgclone.pl should not  be creating a "temp.xml" file under appsutil, The context file created under "/appsutil"  should be _.xml.

Normally adcfgclone.pl is trying to do is,  create files under /usr/tmp and/or /tmp.

Check if you have a temp.xml file or other RapidClone files under either of those directories owned
by a different user? If so please delete them and retry adcfgclone.pl.