Some Common OPatch Application Issue

Issue ->

During Application of Opatch the following error was coming.

The Oracle Home does not meet OUI version requirement.

This OPatch (version xxx) detects OUI version yyy in the home.
It requires OUI version yyy or above.

System intact, OPatch will not attempt to restore the system
OPatch failed with error code 73


Solution ->

1. Download Patch 6880880 for the version xxx
2. cp $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.bak
3. Unzip patch 6880880 in $ORACLE_HOME
4. Use OPatch directory opatch file during opatch inatallation

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

Issue ->

opatch apply command is giving the following error.

LsInventory: OPatch Exception while accessing O2O
OPATCH_JAVA_ERROR  : An exception of type "OPatchException" has occurred:
OPatch Exception:  OUI found no such ORACLE_HOME set in the environment
  Can not get details for given Oracle Home
  An exception occurs
  null
There is no Interim Patch

OPATCH_JAVA_ERROR  : An exception of type "OPatchException" has occurred:
Can not get a list of inventory on this home.

ERROR: OPatch failed because of Inventory problem.



Solution ->

This is because of missing ORACLE_HOME in inventory. Use the following command to recreate the inventory ->
cd $ORACLE_HOME/oui/bin
./runInstaller -silent -attachHome ORACLE_HOME="/other/testclone/XXX/apps/tech_st/10.1.2" ORACLE_HOME_NAME="XXX_HOME"

Now, check whether the oracle home has been added in the inventory using following command.
OPatch/opatch lsinventory -invPtrLoc /other/testclone/XXX/apps/tech_st/10.1.2/oraInst.loc -all

Now apply opatch.

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

R12.1.3 upgrade from R12.1.1 very brief guide

Recently we have upgraded our instance from R12.1.1 to R12.1.3. Our database version was 11.0.6. Here is a step by step guide on how we have 
upgraded this. I have listed all the issue list in the later part of this document.


The main documents you need to follow for main patch application->

Oracle E-Business Suite Release 12.1.3 Readme [ID 1080973.1]
Database Preparation Guidelines for an E-Business Suite Release 12.1.1 Upgrade [ID 761570.1]
Database Initialization Parameters for Oracle Applications Release 12 [ID 396009.1]
Oracle® E-Business Suite Upgrade Guide


Set recyclebin=false and _pga_max_size=104857600 in init.ora file

Now do the following after shutting down the database.
$ sqlplus / as sysdba
Run the following commands ->
SQL> startup pfile=/dbs/init<SID>.ora
SQL> create spfile from pfile='/init<SID>.ora';
File created.
SQL> show parameter utl

Follow document Database Preparation Guidelines for an E-Business Suite Release 12.1.1 Upgrade [ID 761570.1] step by step for your database version. As our
database version was 11.0.6 we have followed path E.

We have applied the following patches in database.
For all UNIX/Linux platforms
Follow document Oracle E-Business Suite Release 12.1.3 Readme [ID 1080973.1] step by step for applying main patch.





======================================
Issue ->
During the upgrade process to 12.1.1 this issue may be seen ->
ORA-04030: out of process memory when trying to allocate 822904 bytes
(pga heap,kco buffer)
ORA-07445: exception encountered: core dump [dbgtfdFileWrite()+48]
[SIGSEGV] [ADDR:0xFFFFFFFF7FFC1C88] [PC:0x1063BD2D0] [Address not mapped
to object] []

Solution ->
For this issue set the following parameter in init.ora file.
_pga_max_size=104857600

Now do the following after shutting down the database.
$ sqlplus / as sysdba
Run the following commands ->
SQL> startup pfile=/dbs/init<SID>.ora
SQL> create spfile from pfile='/init<SID>.ora';
File created.
SQL> show parameter utl

============================================



How to Rapid Clone 12.1.x

This is a brief step by step guide on Oracle Applications R12.1.1 Rapid cloning for the first time after upgrade.

The document you should follow is Cloning Oracle Applications Release 12 
with Rapid Clone [ID 406982.1].

A. For R12.1.1 download and apply patch 9239089 [R12.AD.B.DELTA.3]. It is a must.
[Don't forget the following steps as a prerequisites of applying patch 9239089.
Instructions for running AD Grants
Run the adgrants.sql script as a user that can connect as SYSDBA to grant privileges to selected SYS objects and create PL/SQL profiler objects.

Usage:

1. Create $ORACLE_HOME/appsutil/admin on the database server.

2. Copy adgrants.sql (UNIX) from this patch directory to
$ORACLE_HOME/appsutil/admin.

3. Set the environment to point to ORACLE_HOME on the database server.

4. Use SQL*Plus to run the script:

UNIX:
$ sqlplus /nolog
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql <APPS schema name>
]

B. Apply patch 8919489 by following 3.1 section [Apply the TXK AutoConfig Template patch] of doc 387859.1. The above patch will take some time to complete. This patch basically compiles all the database objects so takes some time. To run this patch fast you can set db initialization parameter _disable_fast_validate=TRUE.

  1. Apply following two patches in R12.1 environment.

9171651:R12.OAM.B 12.1 RAPIDCLONE CONSOLIDATED FIXES JUL/2010
9833058:R12.OAM.B HOT CLONE FAILS WITH ORA-00201 DURING RECOVERY MANAGER

    D. Run AutoConfig on the application tiers.

E. Synchronize appsutil on the database tier nodes.

F. Run AutoConfig on the database tier.

G. Maintain snapshot information.

H. Prepare source database and application tier for cloning as you have previously done for 12.0 system.

$ cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl dbTier

$ cd [INST_TOP]/admin/scripts
$ perl adpreclone.pl appsTier


I. Copy the source db and apps directory to target system using cp -RH command. Don't forget to use -RH options during copying. During copying shutdown the apps tier and db tier of the source system.

    J. The final step is configuring the target system. The step is similar to R12.0 cloning.

Database tier configuration using adcfgclone.
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTier

Apps Tier Configuration
$ cd [COMMON_TOP]/clone/bin
$ perl adcfgclone.pl appsTier




If you follow the above steps and apply all the patches you should not meet any issues. Still see the following link for some R12.1.x cloning issues.

How to change Oracle Applications R12 Port

This summary is not available. Please click here to view the post.

How to Upgrade to Oracle Database 11.1.0.7 from 11.1.0.6 in Oracle Applications 12.1.1

We are upgrading Oracle apps database to 11.1.0.7 from 11.1.0.6. Our Oracle apps version was 12.1.1. Here are the steps we have done for that ->
-----------------------------------------------
Step 1
When upgrading directly from a 10.2 or 10.1 release or updating 11.1.0.6 to 
11.1.0.7, check the current version of the Oracle time zone definitions with the following command:
SELECT version FROM v$timezone_file;

our query reports version 4, so, no action is required.

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

Step 2

Run this query to know the invalid objects before db upgrade. Save the output in one csv file. You can compare this file with the invaid objects after db upgrade.

select object_name, owner, object_type from all_objects where status like 'INVALID';

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

Step 3

Shutdown the apps and database with listener.

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

Step 4

After proper modification on the response file[update all mandatory fields if value is not specified], ran  the following command to apply the patch.

<> /db_upgrade_11_1_0_7_patch/Disk1/runInstaller -silent -responseFile <>/db_upgrade_11_1_0_7_patch/Disk1/response/my_response.rsp

It will take approx. 10-15 mins.
------------------------------------------------------------------

Step 5

The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
<>/db/tech_st/11.1.0/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

-------------------------------------------------------------------
Step 6

1. SQL> startup upgrade
Set the system to spool results to a log file for later analysis:
SQL> SPOOL upgrade_info.log
Run the Pre-Upgrade Information Tool:
SQL> @?/rdbms/admin/utlu111i.sql
Turn off the spooling of script results to the log file:
SQL> SPOOL OFF


-------------------------------------------------------------------
Step 7

Do the original upgrade.

SQL> spool upgrade_11_1_0_7.log
SQL> @?/rdbms/admin/catupgrd.sql


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

Step 8

Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
SQL> @?/rdbms/admin/utlrp.sql

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

Step 9

Check the version using following commands.

SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
select * from v$version

The ideal output should be as follows ->
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production

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


Documents I followed ->
1. 11.1.0.7 Patch Set - Solaris (SPARC) 64bit README [ID 800551.1]
2. ALERT: Oracle 11g Release 1 (11.1) Support Status and Alerts [ID 454507.1]