How to Recreate the OraInventory

How to Recreate the OraInventory
Q: How can I recreate the OraInventory if it gets corrupted or removed?

Solution
In cases where the OraInventory is missing or otherwise corrupt, recreate the oraInventory directory on UNIX systems, using the following steps. In a normal installation, there is a Global Inventory (OraInventory) and a Local Inventory($ORACLE_HOME/inventory). 
  1. Locate the oraInst.loc file, which may be in different locations, depending on your system:

          /var/opt/oracle/oraInst.loc file
          or
          /etc/oraInst.loc
  2. Modify the file oraInst.loc file:

          cp /var/opt/oracle/oraInst.loc /var/opt/oracle/oraInst.loc.bak
          mkdir /u01/oracle/oraInventory

          ---file contents---
          inventory_loc=/u01/oracle/oraInventory
          inst_group=oinstall
          ---file contents---
Important:
Theses example uses a typical directory, considered an $ORACLE_BASE, and a typical UNIX group which installed the Oracle products. Ensure that the correct values are used for your system.

The oraInventory directory is usually a directory under the $ORACLE_HOME. For example, if the $ORACLE_HOME  is equal to "/u01/oracle/product/10g", then the OraInventory could be "/u01/oracle/OraInventory".

  1. Change the permissions to be appropriate, (using your directory location):

          chmod 644 /var/opt/oracle/oraInst.loc
  2. For consistency, copy the file to Oracle home directory, (using your directory location):

    cp $ORACLE_HOME/oraInst.loc $ORACLE_HOME/oraInst.loc.bak
    cp /var/opt/oracle/oraInst.loc $ORACLE_HOME/oraInst.loc
  3. Run Oracle Universal Installer from your Oracle home as below, (using your site specific directory location and Oracle home name):

    cd $ORACLE_HOME/oui/bin
    ./runInstaller -silent -attachHome ORACLE_HOME="/u01/oracle/product/10.2" ORACLE_HOME_NAME="Ora10gHome"
  4. Check the inventory output is correct for your Oracle home:

          $ORACLE_HOME/OPatch/opatch lsinventory -detail
  5. If the table at the beginning of the output is showing the proper directories, and the Oracle home components are properly reflected in the details, then the Global Inventory has been successfully created from the Local Inventory. At this time, you may patch an maintain your Oracle home, as normal

11i and R12 file locations

Important File Locations 
File
Oracle Apps 11i
Oracle Apps R12
Environment Source file
APPSORA.env
APPS<SID>_<hostname>.env
Context File (Middle tier)
$APPL_TOP/admin/$TWO_TASK.xml
$INST_TOP/appl/admin/$TWO_TASK_<hostname>.xml
tnsnames.ora (OH)
$ORACLE_HOME/network/admin/<CONTEXT>
$INST_TOP/ora/10.1.2/network/admin
listener.ora
$ORACLE_HOME/network/admin/<CONTEXT>
$INST_TOP/ora/10.1.2/network/admin
appsweb.cfg
$OA_HTML/bin
$INST_TOP/ora/10.1.2/forms/server
tnsnames.ora (Apache)
$IAS_ORACLE_HOME/network/admin/<CONTEXT>
$INST_TOP/ora/10.1.3/network/admin
jsev.properties
$IAS_ORACLE_HOME/Apache/Jserv/etc
$INST_TOP/ora/10.1.3/opmn/conf/opmn.xml
httpd.conf
$IAS_ORACLE_HOME/Apache/Apache/conf
$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf
apps.conf
$IAS_ORACLE_HOME/Apache/Apache/conf
$ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf
formservlet.ini
$IAS_ORACLE_HOME/Apache/Jserv/etc
$ORACLE_HOME/forms/server/default.env
topfile.txt
$APPL_TOP/admin
$APPL_CONFIG_HOME/admin
adovars.env
$APPL_TOP/admin
$APPL_CONFIG_HOME/admin
adjborg2.txt
$APPL_TOP/admin
$APPL_CONFIG_HOME/admin
SSL Certificates
$COMMON_TOP/admin/certs
$INST_TOP/certs
AD scripts logs
$COMMON_TOP/admin/log/<SID_hostname>
$LOG_HOME/appl/admin/log
Concurrent Request logs
$APPLCSF
$APPLCSF
Apache logs
$IAS_ORACLE_HOME/Apache/Apache/logs
$LOG_HOME/ora/10.1.3/Apache
Jserv logs
$IAS_ORACLE_HOME/Apache/Jserv/logs
$LOG_HOME/ora/10.1.3/j2ee
javacache.log
$COMMON_TOP/rgf/<SID_hostname>
$LOG_HOME/appl/rgf


Environmental variables 
Variable
Oracle Apps 11i
Oracle Apps R12
APPL_TOP
$HOME/<SID>appl
$HOME/apps/apps_st/appl
COMMON_TOP
$HOME/<SID>comn
$HOME/apps/apps_st/comn
ORACLE_HOME (applmgr)
$HOME/<SID>ora/8.0.6
$HOME/apps/tech_st/10.1.2
IAS_ORACLE_HOME
$HOME/<SID>ora/iAS
$HOME/apps/tech_st/10.1.3
ORACLE_HOME (oracle)
$HOME/<SID>db/10.2.0
$HOME/db/tech_st/10.2.0
ORADATA
$HOME/<SID>data
$HOME/db/apps_st/data
JAVA_TOP, OA_JAVA
$COMMON_TOP/java
$COMMON_TOP/java/classes
OA_HTML
$COMMON_TOP/html
$COMMON_TOP/webapps/oacore/html
FND_SECURE
$FND_TOP/secure/<SID>
$INST_TOP/appl/fnd/12.0.0/secure
ADMIN_SCRIPTS_HOME
$COMMON_TOP/admin/scripts/<SID>
$INST_TOP/admin/scripts
LOG_HOME
-
$INST_TOP/logs
FORMS_WEB_CONFIG_FILE
-
$INST_TOP/ora/10.1.2/forms/server/appsweb.cfg
AF_JLIB
-
$COMMON_TOP/java/lib
JAVA_BASE
-
$COMMON_TOP/java
INST_TOP
-
$HOME/inst/apps/<CONTEXT>
ORA_CONFIG_HOME
-
$INST_TOP/ora
APPLCSF
$COMMON_TOP/admin
$LOG_HOME/appl/conc

What are the key configuration files of Oracle EBS and Where are the key configuration files located(for 11i and R12)


EXPLANATION OF SOME IMPORTANT CONFIGURATION FILES in 11i
===================================================

httpd.conf ->This is main Apache configuration file. From this configuration file it identify port definitions, memory settings, loggin levels, log file locations and other configuration options and files.

Port=web_cache_port: Specifies the Oracle Application Server Web Cache listening ports
Listen=Oracle_HTTP_Server_port: Specifies the HTTP and HTTPS ports obtained by Oracle HTTP Server.

jserv.conf -> Oracle HTTP Server includes a Java Virtual Machine (JVM), which is called
JServ. jserv.conf and jserv.properties are the key configuration files for Jserv

All our Self Service servlets requests are via mod_jserv like discoverer view, xml services or OAM login (So you know now where to look if issue happens in these services) If your Form Server is in servlet Mode then Core Applications are also accessed via Web Server (Jserv Component)
This file calls few properties files like jserv.properties, zone properties, viewer4i.properties, forms.properties, xmlsvcs.properties.
This file calls other configuration files like plsql.conf, immeting.conf, apps.conf.

oprocmgr.conf ->(in Apache/conf) This Oracle module provides process management and load balancing services to JServ processes
This module starts, stops, and detects death of processes (starting new processes to replace them), and provides load balancing services to the processes

oracle_apache.conf -> This configuration file is used to configure Oracle built modules supplied with default Apache like mod_pls, mod_ossl, oem, imeeting. These files are used for mod_pls configuration.

Plsql.conf ->This file is used to configure pls (Plsql). This file defines to forward all requests like /pls/ to dedicated apache listener.
mod_plsql is an Oracle HTTP Server plug-in that communicates with the database. It maps browser requests into database stored procedure calls over a SQL*Net connection. It is often indicated by a /pls/ virtual path.
wdbsvr.app ->Which in my views is named so after Web Database Server for Applications. This file contains your dad (database Access Descriptor) information like database connection description & apps user name & password. If you are changing apps password you use utility FNDCPASS and after changing password you have to manually change apps password in this file.


Configuration Files Under R12.
======================
R12 File System INST_TOP in R12

Remember there are no jserv.properties or jserv.conf or zone.properties in R12 (new techstack), Jserv is replaced by OACORE!
 The following will cover the configuration files that will fall under INST TOP directory structure.
 All the configuration Files are placed under $ORA_CONFIG_HOME
 If you go inside this directory you will see 10.1.2 and 10.1.3
 10.1.2 configuration files will be residing in 10.1.2. for e.g $FORMS_WEB_CONFIG_FILE is placed under $ORA_CONFIG_HOME/10.1.2 - in my instance it is in /slot/ems1636/appmgr/inst/apps/tkr12r3d_rws60029rems/ora/10.1.2/forms/server/appsweb.cfg
 10.1.3 configuration files will be placed under $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/
 httpd.conf is located at $ORA_CONFIG_HOME/10.1.3/Apache/Apache/conf/
 Same location you will see (all apache related configurations files)

Env file:
 $ORA_CONFIG_HOME/10.1.3/$CONTEXT_NAME.env
 OH config files: Location: $ORA_CONFIG_HOME/10.1.3/config
 These files are security related/iAS related parameters. Mostly no modifications required manually. OID/SSO registrations scripts modifies directly.

ias.properties
iasschema.xml
j2ee_instance_jazn.properties
jazn-data.xml
jazn.xml

Apache Related Configuration Files: $IAS_ORACLE_HOME/Apache/Apache/conf

apps.conf
custom.conf
dms.conf
httpd.conf
mod_oc4j.conf - newly introduced for OC4J conf
mod_osso.conf - replaced mod sso conf
oracle_apache.conf
osso
restricted_mode_apache.conf
security.conf
ssl.conf
ssl_terminator.conf
trusted.conf
url_fw.conf

OPMN config file:
 $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
 Used by Oracle Process Manager and Notification Server (OPMN)
 Contains details of all the OC4J instances deployed on the server
Location of the log files for OPMN
 Various ports used by OPMN
$ORA_CONFIG_HOME/10.1.3/network/tnsnames.ora - Apache connection config file

OC4J configuration files:
There are three OC4J deployments in 10.1.3 oracle Homes
they are oacore oc4j, forms oc4j, oafm oc4j. All oc4j's will have similar configuration files.
 application.xml
default-web-site.xml
global-web-application.xml
j2ee-logging.xml
jazn.xml
jms.xml
oc4j-connectors.xml
oc4j.properties
ohwconfig.xml
rmi.xml
server.xml
system-application.xml
system-jazn-data.xml

JavaCache config file:
 $ORA_CONFIG_HOME/10.1.3/javacache/admin/javacache.xml
 10.1.2 OH related config Files:

Env file:
 $ORA_CONFIG_HOME/10.1.2/$CONTEXT_NAME.env

Form Server Configuration Files:
Location: $ORA_CONFIG_HOME/10.1.2/forms/server
default.env (replacement of formservlet.ini in 11i)
socket.env

appsweb.cfg ($FORMS60_WEB_CONFIG_FILE is replaced with $FORMS_WEB_CONFIG_FILE)

Report Builder config file:
 $ORA_CONFIG_HOME/10.1.2/reports/conf/rwbuilder.conf

10.1.2 Listener config files:

$ORA_CONFIG_HOME/10.1.2/network/admin