Sunday, December 28, 2014

OUI-67076: opatch lsinventory Error

Faced an issue with command 'opatch lsinventory' and reports below error in log file.

Cause: OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.

Please check below 'opatch lsinventory' output.

$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/oracle/product/11.2.0
Central Inventory : /u01/oracle/product/oraInventory
   from           : /u01/oracle/product/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2014-12-24_02-41-49AM_1.log
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
Lsinventory Output file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2014-12-24_02-41-49AM.txt
..............................
..............................
OPatch Session completed with warnings.
OPatch completed with warnings.
$
$ more /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2014-12-24_02-41-49AM_1.log
[ 2:41:49 AM]    OPatch invoked as follows: 'lsinventory -invPtrLoc /u01/oracle/product/11.2.0/oraInst.loc '
[ 2:41:49 AM]    OUI-67077:
                             Oracle Home       : /u01/oracle/product/11.2.0
                             Central Inventory : /u01/oracle/product/oraInventory
                                from           : /u01/oracle/product/11.2.0/oraInst.loc
                             OPatch version    : 11.2.0.3.0
                             OUI version       : 11.2.0.3.0
                             OUI location      : /u01/oracle/product/11.2.0/oui
                             Log file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2014-12-24_02-41-49AM_1.log
[2:41:49 AM]    Patch history file: /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch_history.txt
[2:41:49 AM]    Starting LsInventorySession at Wed Dec 24 02:41:49 PST 2014
[2:41:49 AM]    OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
[ 2:41:50 AM]    Lsinventory Output file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2014-12-24_02-41-49AM.txt
.................................
.................................
$

Solution:

1) Take a backup of $ORACLE_HOME/.patch_storage directory
$ cp -R $ORACLE_HOME/.patch_storage $ORACLE_HOME/.patch_storage_backup

2) Remove $ORACLE_HOME/.patch_storage/patch_locked
$ rm $ORACLE_HOME/.patch_storage/patch_locked

3) Create empty file $ORACLE_HOME/.patch_storage/patch_free
$ touch $ORACLE_HOME/.patch_storage/patch_free

4) Verify that "opatch lsinventory" no longer reports the error
$ opatch lsinventory

Issue fixed now, check below output.

$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/oracle/product/11.2.0
Central Inventory : /u01/oracle/product/oraInventory
   from           : /u01/oracle/product/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch2014-12-26_01-38-24AM_1.log
Lsinventory Output file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2014-12-26_01-38-24AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
...........................
...........................
..........................
OPatch succeeded.
$

Thats it. Hope this will help you.. :)

Best Regards,
Chowdari.

Sunday, December 21, 2014

Oracle Database 12cR1 installation (12.1.0.2) on linux

Follow below steps to install oracle database 12c Release 1 (12.1.0.2) software on Linux machine.

Prerequisite: Oracle Enterprise Linux 5.7 Installation

Download below selected Oracle 12.1.0.2 software (Two files) from edelivery.


Copy database software files to  /u01/1212SW location.

Start 1212DB VMachine




Follow below steps to install oracle 12cR1 database software and creation of ORCL database:

Create required group and User:

[root@1212db 1212SW]# groupadd dba
[root@1212db 1212SW]# useradd -g dba oracle
[root@1212db 1212SW]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@1212db 1212SW]#

Create directories and give folder permissions in which Oracle software will be installed:


Unzip the 12c database software:





Before running runInstaller open a new terminal and run xhost + as a root user:



Start Installation with run runInstaller:





 Uncheck the Updates box, Click Next and then click yes


Select 'Create and configure a database' option and click Next

Select 'Desktop class' option and click Next


Here select oracle base, software location, datafile location, database edition, character set, DB name and give password then click NEXT


 Verifying all prerequisites.


 After successful of prerequisite verification then click Install  



Open new terminal and log in as root and run below root.sh script



After run the root.sh script then click OK 



Click OK to Continue


Database installation successful wizard.


Now check the database version.


That's it..Completed Oracle 12cR1 (12.1.0.2) database installation and created new ORCL database.

Hope this will help you!!! :)

Best Regards,
Chowdari


Some Most Popular Articles