Saturday, November 13, 2010

Unable to lock Central Inventory. OPatch will attempt to re-lock

Sometimes while applying a patch on the database (opatch) i come across the following error->
Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
n
User Responded with: N
Unable to lock Central Inventory. Stop trying per user-request?
OPatchSession cannot load inventory for the given Oracle Home /u01/XXXXDB/product/10.2.0. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory

ApplySession failed: ApplySession failed to prepare the system. Unable to lock Central Inventory. Stop trying per user-request?
System intact, OPatch will not attempt to restore the system
OPatch failed with error code 73

Here's the Solution
/var/opt/oracle/oraInventory/ContentsXML/comps.xml was owner by applmgr and oracle was not having write permissions on it. Changed the owner to "oracle" & changed the permissions to "777" which resolved the issue.
Sometimes the above permissions are already there and patch failed because of other issues. You might want to do the following in these cases
Remove the directory /var/opt/oracle/oraInventory/locks if it exists
Remove the file under $ORACLE_HOME/.patch_storage if it exists
Change the permissions of /var/opt/oracle/oraInventory to "777" and owner to oracle.
Please note that "/var/opt/oracle/oraInventory" is the central inventory as mentioned in /var/opt/oracle/oraInst.loc

Friday, October 1, 2010

Differences between Oracle Apps 11i and R12

The Database Version was 9i Release 2 in Oracle Apps 11i. It has been replaced by 10g Release 2 (10.2.0.2) in Apps R12.

HTTP server consist of iAS (1.0.2.2.2) in apps 11i. It has been replaced by 10.1.3 (10g AS) in apps R12.

Forms 6i in apps 11i has been replaced by Forms 10.1.2 (10g AS) in apps R12.

Socket mode was the default for forms connectivity in apps 11i. In R12, servlet mode is the default.

Jserv in apps 11i has been replaced by OC4J in R12.

JDK 1.3.1 in apps 11i has been replaced by JRE 1.5 in apps R12.

JDBC version 9 in apps 11i has been replaced by JDBC 10.2.0 in Apps R12.

Modplsql/ mod_pls has been removed from Apps R12.

NOTE:- Although Release 12 uses OracleAS 10g -10.1.2 and 10.1.3, these components do not require an OracleAS 10g Infrastructure (Metadata Repository). The Release 12database does not include a OracleAS 10g Infrastructure