Monday, March 24, 2014

Oracle Applications 11i Components, Configuration Files and Log Files

Oracle Applications 11i Components, Configuration Files and Log Files
ORACLE APPS COMPONENT DETAILS
================================================== =

1) ComponentName : Apache
================================================== =

Configuration file path :

$IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf - Main Configuration File
$IAS_ORACLE_HOME/Apache/Apache/conf/httpd_pls.conf - pls (plsql) integration in web server
$IAS_ORACLE_HOME/Apache/Apache/conf/apps.conf - used to define aliases used in URL access
$IAS_ORACLE_HOME/Apache/Apache/conf/oracle_apache.conf - used to include other configuration files

Log file path : $APACHE_TOP/Apache/logs

Startup Script file path
$COMMON_TOP/admin/scripts/SID_HOST/adapcctl.sh start

Shutdown Script file path
$COMMON_TOP/admin/scripts/SID_HOST/adapcctl.sh stop

Process Identification method
ps -ef|grep - i <sid>|grep - i Apache
ps -ef|grep - i <sid>|grep - i httpd

netstat -a|grep <webport#>

Application Profile Names

Application Framework Agent / Applications Web Agent / Apps servlet Agent / JTF_BIS_OA_HTML / TCF:HOST

Troubleshooting tips

Check the log file error_log , access_log
Check for correct port# in httpd.conf & httpd_pls.conf
Check all config files in $APACHE_TOP/Apache/conf for any entries
pointing to source and replace with target
Parameters httpd.conf: Timeout
httpd.conf: KeepAliveTimeout
httpd.conf: SSLSessionCacheTimeout

2) Component Name : Concurrent Manager
================================================== =

Requires tnsnames.ora, listener.ora,
<HOSTNAME>_<SID>_ifile.ora (for PCP) in $TNS_ADMIN directory.

Also looks for tnsnames.ora in
$IAS_ORACLE_HOME/Apache/network/admin/<SID>_<HOSTNAME> directory.

Log file path : $APPLCSF/$APPLLOG

Startup Script file path
adcmctl.sh start apps/<passwd> in $SCRIPT_TOP
(SCRIPT_TOP=$COMMON_TOP/admin/scripts/<SID>_<HOSTNAME>)

Shutdown Script file path
adcmctl.sh stop apps/<passwd> in $SCRIPT_TOP
(SCRIPT_TOP=$COMMON_TOP/admin/scripts/<SID>_<HOSTNAME>)

Process Identification method
ps -eaf | grep <apuser> | grep FND
ps -eaf | grep <apuser> | grep FNDLIBR = Standard and Internal Manager
(should spawn multiple FND processes)

ps -eaf | grep <apuser> | grep FNDSM = Service Manager
ps -eaf | grep <apuser> | grep FNDCRM = Conflict Resolution Manager


3) Component Name : Discoverer 4i
================================================== =

Configuration file path
#-------------Discoverer configuration files (details of ports and IP
addresses)-------------------------
$ORACLE_HOME/discwb4/discwb.sh
$ORACLE_HOME/discwb4/util/pref.txt
$ORACLE_HOME/vbroker/bin/gatekeeper.properties
$APACHE_TOP/Apache/htdocs/discwb4/applet/gatekeeper.properties

#-------------Discoverer components registration files
$ORACLE_HOME/discwb4/util/applypreferences.sh
$ORACLE_HOME/discwb4/util/registerosaagent.sh
$ORACLE_HOME/discwb4/util/registeroad.sh
$ORACLE_HOME/discwb4/util/registerlocator.sh
$ORACLE_HOME/discwb4/util/registerall.sh
$ORACLE_HOME/discwb4/util/unregisterlocator.sh
$ORACLE_HOME/discwb4/util/unregisteroad.sh
$ORACLE_HOME/discwb4/util/unregisterosaagent.sh
$ORACLE_HOME/discwb4/util/unregisterall.sh
#--------------Registered components detail
files----------------------------------------------------------------
$ORACLE_HOME/vbroker/adm/impl_dir/impl_rep~
$ORACLE_HOME/vborker/adm/impl_dir/impl_rep
$IAS_ORACLE_HOME/Apache/Apache/htdocs/discwb4/applet/gatekeeper.ior
$IAS_ORACLE_HOME/Apache/Apache/htdocs/discwb4/applet/locator.ior
Log file path $ORACLE_HOME/discwb4/util/oad.log
$ORACLE_HOME/discwb4/util/osaagent.log
$ORACLE_HOME/discwb4/util/locator.log
$ORACLE_HOME/discwb4/util/error.txt
$ORACLE_HOME/discwb4/util/diag.log
$APACHE_TOP/Apache/htdocs/discwb4/applet/gatekeeper.log

Startup Script file path

$ORACLE_HOME/discwb4/util/startosaagent.sh
$ORACLE_HOME/discwb4/util/startoad.sh
$ORACLE_HOME/discwb4/util/startlocator.sh
$ORACLE_HOME/discwb4/util/startgatekeeper.sh
$ORACLE_HOME/discwb4/util/startall.sh

Shutdown Script file path
$ORACLE_HOME/discwb4/util/stopgatekeeper.sh
$ORACLE_HOME/discwb4/util/stoplocator.sh
$ORACLE_HOME/discwb4/util/stopoad.sh
$ORACLE_HOME/discwb4/util/stoposaagent.sh
$ORACLE_HOME/discwb4/util/stopall.sh

Process Identification method

ps -ef|grep vbroker
netstat -a|grep 10508
netstat -a|grep 10552
$ORACLE_HOME/discwb4/util/checkdiscoverer.sh
$ORACLE_HOME/discwb4/oadutil list
$ORACLE_HOME/discwb4/osfind

Application Profile Names
ICX: Discoverer Launcher
ICX: Discoverer Viewer Launcher
ICX: Discoverer use Viewer
ICX: Discoverer Default End User Layer Schema Prefix

Troubleshooting tips
1.Check the Log files
2.Commonly issues are with the dbc file or tnsnames.ora

4) Component Name : FORMS
================================================== =

Configuration file path

1.$COMMON_TOP/html/bin/appsweb_SID_Hostname.cfg. = main configuration file for Forms Server
2.$FND_TOP/resource/appsweb_SID_Hostname.cfg.

Check the configuration file name in SID.env file under APPL_TOP dir.

Log file path : Log files are under $COMMON_TOP/admin/log/SID_Hostname/

Startup Script file path
1.Start Forms Server Listener process
$COMMON_TOP/admin/scripts/SID_Hostname/adfrmctl.sh start.
2.Start Forms Metrics Client
$COMMON_TOP/admin/scripts/SID_Hostname/adfmcctl.sh start.
3.Start Forms Metrics Server
$COMMON_TOP/admin/scripts/SID_Hostname/adfmsctl.sh start.

Shutdown Script file path
1.Stop Forms Server Listener process
$COMMON_TOP/admin/scripts/SID_Hostname/adfrmctl.sh stop.
2.Stop Forms Metrics Client
$COMMON_TOP/admin/scripts/SID_Hostname/adfmcctl.sh stop.
3.Stop Forms Metrics Server
$COMMON_TOP/admin/scripts/SID_Hostname/adfmsctl.sh stop.

Process Identification method
ps -ef |grep f60 ,
ps -ef |grep f60srvm = Forms Server
ps -ef |grep f60webmx = Forms Runtime Client

Application Profile Names

1.ICX: Forms Launcher.
2.Forms Runtime Parameter.

Troubleshooti ngtips
1.Check whether FORMS60_MAPPING in $APPL_TOP/SID.env is set to correct URL or not.
2.Check whether serverPort,serverName and domainName are correctly set in
3.Configuration errors in $COMMON_TOP/html/bin/appsweb_SID_Hostname.cfg file.

5) Component Name : Reports Server
================================================== =


Configuration file path : $ORACLE_HOME/reports60_server
Log file path : $ORACLE_HOME/report60/server/REP60_<SID>.log

Startup Script file path
$SCRIPT_TOP/adrepctl.sh start

Shutdown Script file path
SCRIPT_TOP/adrepctl.sh stop

Process Identification method
ps -ef |grep rwmts60

Application Profile Names
ICX: Report Launcher Troubleshooting tips

Check password in CGIcmd.dat (ORACLE_HOME/report60/server)
& Display variable in ORACLE_HOME/report60_server, DISPLAY
variable in Jserv/etc as well

6) Component Name : Jserv/Jsp
================================================== =

Name Configuration file path
$APACHE_TOP/Jserv/etc/jserv.conf = Used to configure the jvms
jserv.properties = Used to set the properties of the oacore JVM
jserv_restrict.properties
$APACHE_TOP/Apache/conf/oprocmgr.conf
Log file path $APACHE_TOP/Jserv/logs & $APACHE_TOP/Jserv/logs/jvm

Startup Script file path (same script as Apache)
$SCRIPT_TOP/adapcctl.sh start

Shutdown Script file path
$SCRIPT_TOP/adapcctl.sh stop

Process Identification method
netstat -an | grep <port mentioned in oprocmgr.conf>

Application Profile Names
Apps Servlet Agent,Applications JSP Agent,OTS: JSP Details from OTS

Troubleshooting tips
Check <Apache Home Page URL>/servlets/Hello, Apache Log files , Jserv log files and
configuration files mentioned above.

7) Component Name : Workflow
================================================== =

Configuration file path
OAM for Java based Notification Mailer and in older version C based Notif Mailer $FND_TOP/resource/wfmail.cfg

Log file path $APPLCSF/$APPLLOG (ls -ltr FNDCP*.txt ie FNDCPGSC* and check for last 2 files)
Startup Script file path : Starts with OAM
Shutdown Script file path : Stops with OAM

Process Identification method
1. Checking sendmail : telnet <hostname> smtp or ps -ef | grep sendmail
2. Checking imap: telnet
<hostname> imap
3. Workflow starts with Concurrent Manager so needs to check
Concurrent Manager logs
Application

Profile Names
Two tables needs to be checked for workflow :
1. wf_systems table: select name, display_name from wf_systems;
2. wf_agents table: select address from wf_agents;
3. OAM displays status information of Workflow Components from FND_SVC_COMPONENTS

Troubleshooting tips
Check the Log File
Check the 3 CM related Workflow processes
Check the Agent Status and Notif Mailer Properties
Test Sendmail and IMAP
Check WF related Requests shuold be scheduled 

Saturday, March 22, 2014

Rename Apache Access Logs Daily to enable better Monitoring (Oracle Apps / EBS )


access log
LOCATION :

$IAS_ORACLE_HOME/Apache/Apache/logs

Stop the HTTP Server

2- Make a backup of $ORACLE_HOME/Apache/Apache/conf/httpd.conf:

3- Open the file httpd.conf and search for something like the following line:
...
CustomLog "|D:\oracle\FRM_REP_904\Apache\Apache\bin\rotatelogs.exe logs/access_log 43200" common where ORACLE_HOME=D:\oracle\FRM_REP_904

4 - Modify the httpd.conf file like this example; this will create a new access_log every 24 hours
- 86400 seconds:
...
#
#CustomLog "|D:\oracle\FRM_REP_904\Apache\Apache\bin\rotatelogs.exe logs/access_log 43200" common
#
CustomLog "|D:\oracle\FRM_REP_904\Apache\Apache\bin\rotatelogs.exe logs/access_log.%d%m%Y 86400" common

...

5 - Save the httpd.conf file


How to enable additional logging for Web Server ( Oracle Apps/EBS )


Apache monitoring : Check status of apache using “ adapcctl.sh status ”

• The $APACHE_TOP/Apache/logs directory contains files such as error_log and error_log_pls.
• The JServ log files are located in the $APACHE_TOP/Apache/Jserv/logs and $APACHE_TOP/Apache/Jserv/logs/jvm directories.

If you want to enable additional logging, you can modify level of debug messaging in the jserv.log file.

The location of the jserv.log file is defined by the log.file parameter in the jserv.properties file.

Steps for enabling additional logging:

1. Set LogLevel to DEBUG in $APACHE_TOP/Apache/conf/httpd.conf.
2. Set ApJservLogLevel to DEBUG in $APACHE_TOP/Jserv/etc/jserv.conf.
3. Make the following changes to $APACHE_TOP/Jserv/etc/jserv.properties:

•Add wrapper.bin.parameters=-Djbo.debugoutput=console
•Set log=true
•Set log.channel=true
•Set log.channel.info=true
•Set log.channel.debug=true

Once these changes are made, review the log files for information to assist with troubleshooting the underlying issue.


Tuesday, March 18, 2014

How to Set concurrent programme Priority (Oracle Apps / EBS )


You know the Program name, and want to make execution in priority

The steps are very simple:

Login system administrator /Application developer and go to define concurrent screen
Under Concurrent >> Program >> Define
Find the Program name whose priority you wish to change for ex. "Payable Transfer to GL"
On this screen you can set priority of this request by entering value in "Priority" field( as mark in red) (1 is highest, 99 is lowest, 50 is the default) , Save and exit.

Monday, March 17, 2014

How to troubleshoot Concurrent Manager issue ? (Oracle Apps )


How gather stats improves your query performance ? 


A query normally goes through 3 phases

Parse
Execute
Fetch

In Parse phase syntactical and symantical check are done

Parsing basically is of two types Hard parse & Soft parse

When a query is fired for the first time the query goes through hard parse meaning server process fetches data from data file into the buffer cahces.
For the the subsequent times the query is stored in the library cache until most recently used alogrithm can hold them during this time the query directly
fetches the data from buffer cache instead of Datafile which is nothing but soft parse.

Execute Phase
 If the statement is a query or an INSERT statement, no rows need to be locked because no data is being changed.
 If the statement is an UPDATE or DELETE statement, however, all rows that the statement
 affects are locked from use by other users of the database, until the next COMMIT, ROLLBACK or SAVEPOINT for the transaction.
 This ensures data integrity.

Fetch Phase

Data is fetched from database blocks.
In the fetch phase, rows are selected and ordered (if requested by the query),
and each successive fetch retrieves another row of the result, until the last row has been fetched.


Now coming to the point why statistic are gathered

Lets say we have table emp with 10 million records and over a period of time 1 million records have been deleted.
So when a query is executed on this table which is having an index it will traverse through all the rows (even the deleted rows )
because the information regarding the deleted rows is not updated in the DBA_TAB_STATISTICS or ALL_TAB_STATISTICS as gather stats is not collected.

When the query is executed it generates various execution plans and decides on the best plan during this time the optimizer queries the
DBA_TAB_STATISTICS or ALL_TAB_STATISTICS  to get the latest information of the tables in question so if your gather stats are upto date then these
ALL_TAB_STATISTICS will help the optimizer give a better execution plan 

How to troubleshoot Concurrent Manager issue ? (Oracle Apps )


How to troubleshoot Concurrent Manager issue ? 

Check Concurrent Manager log $SID_[MMDD] where MMDD is Concurrent Manager start Month & Date
 1. $APPLCSF/$APPLLOG/$SID_[MMDD].mgr
Could NOT contact Service Manager FNDSM_INNOWAVE03_visr12.

The TNS alias could NOT be located, the listener process onINNOWAVE03 could NOT be contacted,

OR the listener failed TO spawn the Service Manager process.

  Process monitor session started : 24-SEP-2009 20:31:07Could NOT contact Service Manager FNDSM_INNOWAVE03_visr12.

The TNS alias could NOT be located, the listener process onINNOWAVE03 could NOT be contacted,

OR the listener failed TO spawn the Service Manager process.
2. Error message is pointing towards “FNDSM_INNOWAVE03_visr12″ so run tnsping to check status of TNS alias like
[avisr12@innowave03 ~]$ tnsping FNDSM_INNOWAVE03_visr12
Output like
TNS Ping Utility for Linux: Version 10.1.0.5.0 -

Production on 24-SEP-2009 20:36:12Copyright (c) 1997, 2003, Oracle. 

All rights reserved.Used parameter files:Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=innowave03.com)(PORT=1638)) (CONNECT_DATA=(SID=FNDSM)))

TNS-12541: TNS:no listener
3. Check Apps Listener status like
[avisr12@innowave03 ~]$ lsnrctl status APPS_visr12
LSNRCTL for Linux: Version 10.1.0.5.0 -

Production on 24-SEP-2009 20:37:36Copyright (c) 1991, 2004, Oracle. 

All rights reserved.Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=innowave03.com)(Port=1638))

TNS-12541: TNS:no listener 

TNS-12560: TNS:protocol adapter error 

TNS-00511: No listener  

Linux Error: 111: Connection refused
4. Start Apps Listener
[avisr12@innowave03 scripts]$ ./adalnctl.sh start
output like
adalnctl.sh version 120.3

Checking for FNDFS executable.

Starting listener process APPS_visr12.

adalnctl.sh: exiting with status 0adalnctl.sh: check the logfile /oracle/ apps/ r12/ visr12/ inst/ apps/ visr12_innowave03/ logs/ appl/ admin/ log/ adalnctl.txt formore information ...
5. Try again tnsping again
[avisr12@innowave03 scripts]$ tnsping FNDSM_INNOWAVE03_visr12
output like
TNS Ping Utility for Linux: Version 10.1.0.5.0 -

Production on 24-SEP-2009 20:39:09Copyright (c) 1997, 2003, Oracle. 

All rights reserved.Used parameter files:Used TNSNAMES adapter to resolve the aliasAttempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=innowave03.com)(PORT=1638)) (CONNECT_DATA=(SID=FNDSM)))

OK (0 msec)
6. Restart CM again

Issues related to startup/shutdown of CM
If you try to start CM using adcmctl.sh or adstrtall.sh script & you encounter problem in starting CM then check for log files.

All information related to why Concurrent Manager not coming up is recorder in log file at $APPLCSF/$APPLLOG with default name as $SID_$DD ( where DD is date on which you started Concurrent Manager ). This Concurrent Manager naming convention will be listed in file adcmctl.sh file (Concurrent Manager startup file). If $APPLCSF is not set then you can look for this file in $FND_TOP$APPLLOG
ICM is Up but some managers are still down

As you know adcmctl.sh script starts ICM (Internal Concurrent Manager) and its duty of ICM to start other Managers. If you see ICM is up with some other managers & Issue is with only Particular Managers then look for log files of these managers .
Concurrent -> Manager -> Administer -> Select manager which is not starting -> Click on “Processes” -> Click on “Manager Log” to find out error message.

These individual manager log file, you can access under $APPLCSF/$APPLLOG directory as well.
If your error message is not enough to find out cause of problem then you can enable debug on CM log files . You can enable diagnostics by changing DIAG_PARAM=”" to DIAG_PARAM=”Y” in adcmctl.sh (CM Startup script file)
Other things you can try for CM startup Issues :
Try to bounce CM & see all FNDLIBR processes are cleared before restrarting CM.
You can run cmclean.sql command to clear any Invalid State against any request or manager. Check for any messages in log file.
Check status of Manager from administer Concurrent Manager Window.
Concurrent -> Manager -> Administer (Login as System Administrator Responsibility)


Concurrent Request Lifecycle in Oracle Apps (EBS)


Concurrent Request Lifecycle

Concurrent Request/Program can be under one of four Phases . Each phase has different Status .
Phase : Pending, Running , Completed, Inactive
Status :
Pending - Normal, Standby, Schedules, Waiting
Running – Normal, Paused, Resuming, Terminating
Completed – Normal, Error, Warning, Cancelled, Terminated, Disabled
Inactive – Disabled , On Hold, No Manager
A. Pending Standby  - Phase Pending and Status Standby means Program to run request is incompatible with other program(s) currently running.
How to check Incompatible Program/Request for any Program/Request ?
Login with Application Developer responsibility
Click on Concurrent > Program
Query Program
Click on Incompatibilities button
. Inactive – No Manager
i) No manager is defined to run the request
or
ii) All managers are locked by run-alone requests
or
iii) Concurrent Manager Service is down
or
iv) No concurrent manager process because of workshift
To check Work Shift for any Concurrent Manager From System Administrator responsibility > Concurrent > Manager > Define > Work Shifts > Processes

How to check if Concurrent Manager is Up and running ?
Login as user with System Administrator responsibility.
Under Concurrent : Manager click on Administer (Actual should be equal to Target)


How to run autoconfig in Test Mode in Oracle Apps (EBS)


Go to $AD_TOP/bin
i.e :
/opt/oracle/dfin/dfinappl/ad/11.5.0/bin

[appdfin@sd099fin03 bin]$ adchkcfg.sh /opt/oracle/dfin/dfinappl/admin/dfin_sd099
[appdfin@sd099fin03 bin]$ sh adchkcfg.sh

Enter the full path to the Applications Context file: /opt/oracle/dfin/dfinappl/admin/dfin_sd099fin03.xml

Enter the APPS password:

The log file for this session is located at: /opt/oracle/dfin/dfinappl/admin/dfi

AutoConfig is running in test mode and building diffs...

AutoConfig will consider the custom templates if present.
Using APPL_TOP location : /opt/oracle/dfin/dfinappl
Classpath : /opt/oracle/dfin/dfincomn/util/java/1.4/jr fin/dfincomn/util/java/1.4/lib/tools.jar:/opt/oracle/dfin/dfincomn/java/appsborg

Using Context file : /opt/oracle/dfin/dfinappl/admin/dfin_sd099

Context Value Management will now update the test Context file

Updating test Context file...COMPLETED

[ Test mode ]
No uploading of Context File and its templates to database.

Testing templates from all of the product tops...
Testing AD_TOP........COMPLETED
Testing FND_TOP.......COMPLETED
Testing ICX_TOP.......COMPLETED
Testing IEO_TOP.......COMPLETED
Testing ECX_TOP.......COMPLETED
Testing BIS_TOP.......COMPLETED
Testing GL_TOP........COMPLETED
Testing AMS_TOP.......COMPLETED
Testing CCT_TOP.......COMPLETED
Testing WSH_TOP.......COMPLETED
Testing CLN_TOP.......COMPLETED
Testing OKE_TOP.......COMPLETED
Testing OKL_TOP.......COMPLETED
Testing OKS_TOP.......COMPLETED
Testing CSF_TOP.......COMPLETED
Testing XNC_TOP.......COMPLETED
Testing IGS_TOP.......COMPLETED
Testing IBY_TOP.......COMPLETED
Testing PA_TOP........COMPLETED
Testing JTF_TOP.......COMPLETED
Testing MWA_TOP.......COMPLETED
Testing CN_TOP........COMPLETED
Testing CSI_TOP.......COMPLETED
Testing WIP_TOP.......COMPLETED
Testing CSE_TOP.......COMPLETED
Testing EAM_TOP.......COMPLETED
Testing IMT_TOP.......COMPLETED
Testing FTE_TOP.......COMPLETED
Testing ONT_TOP.......COMPLETED
Testing AR_TOP........COMPLETED
Testing AHL_TOP.......COMPLETED
Testing OZF_TOP.......COMPLETED
Testing IES_TOP.......COMPLETED
Testing CSD_TOP.......COMPLETED
Testing IGC_TOP.......COMPLETED

Differences text report is located at: /opt/oracle/dfin/dfinappl/admin/dfin_sd099fin03/out/10301453/cfgcheck.txt

Generating Profile Option differences report...COMPLETED
Differences text report for the Database is located at: /opt/oracle/dfin/dfinappl/admin/dfin_sd099fin03/out/10301453/ProfileReport.txt
Generating File System differences report......COMPLETED
Differences html report is located at: /opt/oracle/dfin/dfinappl/admin/dfin_sd099fin03/out/10301453/cfgcheck.html

Differences Zip report is located at: /opt/oracle/dfin/dfinappl/admin/dfin_sd099fin03/out/10301453/ADXcfgcheck.zip

AutoConfig completed successfully.


Steps for enabling additional logging Webserver / Apache Server (Oracle Apps / EBS )


The JServ log files are located in the $APACHE_TOP/Apache/Jserv/logs and $APACHE_TOP/Apache/Jserv/logs/jvm directories.
If you want to enable additional logging, you can modify level of debug messaging in the jserv.log file.
The location of the jserv.log file is defined by the log.file parameter in the jserv.properties file.

Steps for enabling additional logging:

1. Set LogLevel to DEBUG in $APACHE_TOP/Apache/conf/httpd.conf.
2. Set ApJservLogLevel to DEBUG in $APACHE_TOP/Jserv/etc/jserv.conf.
3. Make the following changes to $APACHE_TOP/Jserv/etc/jserv.properties:

Add wrapper.bin.parameters=-Djbo.debugoutput=console
Set log=true
Set log.channel=true
Set log.channel.info=true
Set log.channel.debug=true
Once these changes are made, review the log files for information to assist with troubleshooting the underlying issue.

Sunday, March 16, 2014

Script to generate invalid Procedure , Package ,etc in Oracle Database


Following script generates the compilation sql's for the invalid objects

Spool the output in an xyz.sql and execute the xyz.sql

SET SERVEROUTPUT ON SIZE 1000000

BEGIN
  FOR cur_rec IN (SELECT owner,object_name,object_type,DECODE(object_type, 'PACKAGE', 1,'PACKAGE BODY', 2, 2) AS recompile_order
FROM   dba_objects WHERE  object_type IN ('PACKAGE', 'PACKAGE BODY') AND  owner not in ('SYS','SYSTEM','OUTLN') AND    status != 'VALID' ORDER BY 4)
  LOOP
    BEGIN
      IF cur_rec.object_type = 'PACKAGE' THEN
        EXECUTE IMMEDIATE 'ALTER ' || cur_rec.object_type || ' "' || cur_rec.owner || '"."' || cur_rec.object_name || '" COMPILE';
      ElSE
        EXECUTE IMMEDIATE 'ALTER PACKAGE "' || cur_rec.owner ||  '"."' || cur_rec.object_name || '" COMPILE BODY';
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.put_line(cur_rec.object_type || ' : ' || cur_rec.owner ||  ' : ' || cur_rec.object_name);
    END;
  END LOOP;
END;



SET SERVEROUTPUT ON SIZE 1000000
BEGIN
  FOR cur_rec IN (SELECT owner,object_name,object_type,DECODE(object_type, 'FUNCTION', 1,'FUNCTION', 2, 2) AS recompile_order
                  FROM   dba_objects WHERE  object_type IN ('FUNCTION', 'FUNCTION') AND  owner not in ('SYS','SYSTEM','OUTLN') AND    status != 'VALID' ORDER BY 4)
  LOOP
    BEGIN
      IF cur_rec.object_type = 'FUNCTION' THEN
        EXECUTE IMMEDIATE 'ALTER ' || cur_rec.object_type || ' "' || cur_rec.owner || '"."' || cur_rec.object_name || '" COMPILE';
      ElSE
        EXECUTE IMMEDIATE 'ALTER FUNCTION "' || cur_rec.owner ||  '"."' || cur_rec.object_name || '" COMPILE BODY';
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.put_line(cur_rec.object_type || ' : ' || cur_rec.owner ||  ' : ' || cur_rec.object_name);
    END;
  END LOOP;
END;



SET SERVEROUTPUT ON SIZE 1000000
BEGIN
  FOR cur_rec IN (SELECT owner,object_name,object_type,DECODE(object_type, 'PROCEDURE', 1,'PROCEDURE', 2, 2) AS recompile_order
                  FROM   dba_objects WHERE  object_type IN ('PROCEDURE', 'PROCEDURE') AND  owner not in ('SYS','SYSTEM','OUTLN') AND    status != 'VALID' ORDER BY 4)
  LOOP
    BEGIN
      IF cur_rec.object_type = 'PROCEDURE' THEN
        EXECUTE IMMEDIATE 'ALTER ' || cur_rec.object_type || ' "' || cur_rec.owner || '"."' || cur_rec.object_name || '" COMPILE';
      ElSE
        EXECUTE IMMEDIATE 'ALTER PROCEDURE "' || cur_rec.owner ||  '"."' || cur_rec.object_name || '" COMPILE BODY';
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.put_line(cur_rec.object_type || ' : ' || cur_rec.owner ||  ' : ' || cur_rec.object_name);
    END;
  END LOOP;
END;



SET SERVEROUTPUT ON SIZE 1000000
BEGIN
  FOR cur_rec IN (SELECT owner,object_name,object_type,DECODE(object_type, 'TRIGGER', 1,'TRIGGER', 2, 2) AS recompile_order
                  FROM   dba_objects WHERE  object_type IN ('TRIGGER', 'TRIGGER') AND  owner not in ('SYS','SYSTEM','OUTLN') AND    status != 'VALID' ORDER BY 4)
  LOOP
    BEGIN
      IF cur_rec.object_type = 'TRIGGER' THEN
        EXECUTE IMMEDIATE 'ALTER ' || cur_rec.object_type || ' "' || cur_rec.owner || '"."' || cur_rec.object_name || '" COMPILE';
      ElSE
        EXECUTE IMMEDIATE 'ALTER TRIGGER "' || cur_rec.owner ||  '"."' || cur_rec.object_name || '" COMPILE BODY';
      END IF;
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.put_line(cur_rec.object_type || ' : ' || cur_rec.owner ||  ' : ' || cur_rec.object_name);
    END;
  END LOOP;
END;

Cloning in Oracle Apps (EBS) Different Methods like Offline / Online


EBS Cloning:
---------------

- Rapid clone
|
|-> adpreclone.pl (source) : It is to prepare the source Application
| -System for cloning.
|
|-> adcfgclone.pl (target) : It is to configure(clone) the target Application System.

- adpreclone.pl

db-tier: $ORACLE_HOME/appsutil/scripts/


apps-tier: $ADMIN_SCRIPTS_HOME

- adcfgclone.pl

db-tier: $ORACLE_HOME/appsutil/clone/bin

apps-tier: $COMMON_TOP/clone/bin

Offline Cloning:(S-S)
------------------

source: node1

target: node3

- Check the pre-req & apply required patches on source

- Run adpreclone.pl on source

db-tier:

Logfile: $ORACLE_HOME/appsutil/log//StageDBTier_.log

Stage dir "clone" : $ORACLE_HOME/appsutil


apps-tier:


Logfile: $INST_TOP/admin/log/StageAppsTier_.log

Stage dir "clone" : $COMMON_TOP


- copy the source node files & dirs to target (stop all the services)

db-tier:

scp -r * node3:/u01


apps-tier:

SCP -r * node3:/u02


- Run adcfgclone.pl on target

db- tier:

Context file logfile: $ORACLE_HOME/appsutil/clone/bin/CloneContext_.log

adclone logfile: $ORACLE_HOME/appsutil/log//ApplyDBTier_.log

apps-tier:

Context file logfile: $COMMON_TOP/clone/bin/CloneContext_.log

adclone logfile: $INST_TOP/admin/log//ApplyAppsTier_.log


- Perform post cloning steps


Single to Multi node Cloning:
---------------------------------

source : node1
Target : node3 :(db,cms) node2 :(Apache,OC4J..)



- Check the pre-req & apply the required patches on source

- Prepare the target nodes

node3:


node2:

- Run adpreclone.pl on source

db-tier:
apps-tier:


- Stop all the services & copy the source node files & dirs to target

db-tier:
apps-tier:

- Run adcfgclone.pl on target node

db-tier:

oracle $cd /u01/db/tech_st/11.1.0/appsutil/clone/bin

$perl adcfgclone.pl dbTier

apps-tier:

node3:

applmgr $cd /u02/apps/apps_st/comn/clone/bin

$perl adcfgclone.pl appsTier

node2:

applmgr $cd /u02/apps/apps_st/comn/clone/bin

$perl adcfgclone.pl appsTier


Perform Post-cloning tasks:


1. Update profile options

Rapid Clone updates only site level profile options.
If any other profile options are set to instance specific values,
you must update them manually


2. Update printer settings

If the new cloned system needs to utilize different printers,
update the target system with the new printer settings now

3. Update Workflow configuration settings

Cloning an Oracle Applications instance will not update the host
and instance-specific information used by Oracle Workflow.
Review the tables and columns listed in Table 4 to check for any
instance-specific data in the Workflow configuration on the target system

4. Verify the APPLCSF variable setting

Source the APPS environment and review that the variable APPLCSF
(identifying the top-level directory for concurrent manager log and output files)
points to a suitable directory. To modify it, change the value of the
s_applcsf variable in the context file and then run AutoConfig.

5. Update the SESSION_COOKIE_DOMAIN value in ICX_PARAMETERS

If the target system is in a different domain name than the source system
and SESSION_COOKIE_DOMAIN was not null in the source system,
update that value to reflect the new domain name







Online Cloning(s-s):
------------------------

source : node8

target : node53 (db ,cms)

node54 (Apache, oc4j ...)

Note: DB must be in archive log mode.

- Check the pre-requisites & apply required patches

* Latest AD patch

* Patches for Rapid clone


- Prepare the target node


- Run adpreclone.pl on source

db-tier:

apps-tier:


- Enable backup mode for db & copy all source node files & dirs to target:

db-tier:
scp -r db node53:/u01

(or)

tar zcvf - db | ssh node53:('cd /u01;tar zxvf -)


apps-tier:

scp -r apps inst node53:/u02

(or)
tar zcvf - apps inst | ssh node53:('cd /u02;tar zxvf -)


- End backup & take backup of control file:

- Copy the backup controlfile & archives to target


- Configure the target node

- Run adcfgclone.pl on db-tier

Logfile: $ORACLE_HOME/appsutil/clone/bin/cloneContext_.log

$ORACLE_HOME/appsutil/log//ApplyDBTier_.log

- Create control file & recover database

- Add tempfile to TEMPORARY Table Space

- Run adcfglcone.pl to configure database.

- Run adcfgclone.pl on apps-tier

Logfile: $COMMON_TOP/clone/bin/cloneContext_.log

$INST_TOP/admin/log/ApplyAppsTier_.log

- Set the env

- Perform post_cloning Tasks.

Checking Patch history using OAM (EBS)


Checking Patch history using OAM:
---------------------------------
- Login as SYSADMIN

- Select "System Administrator" resp

- nav: Oracle Applications Manager: Patching and Utilites

ex:
codeline

R12.0.x R12.A

R12.1.x R12.B

Product codelevel

R12.0.4 AD R12.AD.A.4

R12.1.1 AD R12.AD.B.1 ---------> R12.AD.B.3

Table: ad_trackable_entities

-> Patch Wizard:
It is a tool to create patch filters, download patches, analyze the patch impact ..

- nav: Oracle Applications Manager: Dashboard:

How to Trace particular form in Oracle Apps (EBS) also tracing concuurent programs (mentioned below in comments)


Tracing particular form in EBS :
->open the form:help:diagnostics:trace:trace with waits
-Trace will be generated in udump.
- perform some transaction
->Disable the trace
help:diagnostics:trace:notrace
->Use tkprof to convert the trace file to understandable format.
$cd $ORACLE_HOME/admin/PROD_node11/udump


Saturday, March 15, 2014

Query to find/fetch Node Information in Oracle Apps (EBS)


How to find out what component of u r oracle applications were installed on which node?
Xml file (context file)

Below query also tells you node information :

select node_name, support_cp as "CMNODE" , support_forms as " Forms" , support_web as "WEB" , support_admin as "ADMIN", status from fnd_nodes ;


How to compile Oracle Apps Forms (11i & R12)


Check whether the forms that you want to generate are not in use at the time you are generating them.
If they are in use when you generate the fmx files, the forms client session terminates.

1) Login to the Forms server node as applmgr and run .env file to set the applications environment.
2) Change directory to $AU_TOP/forms/US.
3) Use the “f60gen” command to generate the fmx files for the fmb files.
4) Issue the following command :
f60gen module=.fmb userid=apps/ output_file=/forms/US/.fmx


How to compile Oracle Apps R12 Forms
===================================
1) Log into the forms tier.
2) Compile the form

Log into the forms tier.

a)- If you are using forms customizations (CUSTOM.pll) then run the command below to compile the form.
frmcmp_batch.sh module= userid=APPS/APPS output_file= module_type=form compile_all=special

For eg:-
frmcmp_batch.sh module=/u01/oracle/TEST/apps/apps_st/appl/au/12.0.0/forms/US/XXX.fmb userid=APPS/APPS output_file=/u01/oracle/TEST/apps/apps_st/appl/inv/12.0.0/forms/US/XXX.fmx module_type=form compile_all=special
b) If you are NOT using forms customizations, then run the command below to compile the form.

frmcmp_batch.sh module= userid=APPS/APPS output_file= module_type=form

For example..
frmcmp_batch.sh module=/u01/oracle/TEST/apps/apps_st/appl/au/12.0.0/forms/US/XXX.fmb userid=APPS/APPS output_file=/u01/oracle/TEST/apps/apps_st/appl/inv/
12.0.0/forms/US/XXX.fmx module_type=form

Friday, March 7, 2014

Fndload Utility Oracle Apps


FNDLOAD is a utility which is similar to sqlloader but loads code objects into database, where as SQLLOADER loads data objects into database.


Download

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxx.ldt PROGRAM APPLICATION_SHORT_NAME="AR" CONCURRENT_PROGRAM_NAME="ABC1234"

Upload
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXX.ldt -WARNING=YES UPLOAD_MODE=REPLACE CUSTOM_MODE=FORCE

While applying a patch if that patch is failing because of a pre-req then how you will apply that pre-req patch and resume with the current patch?


We need to take the backup of FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables and restart directory at APPL_TOP/amdin/SID and then use adctrl to quit all the workers. Then apply the pre-req patch , after that rename u r restart directory to its original name and create FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables from the bcakup tables.

Start adpatch session and take the options want to continue previous session.

adpatch compares file versions before copying


What c-driver will do?

C-drive copies the files from patch unzipped directory to required location in u r application file system. Before copying it will check the file version of the existing file at the file system with the file version of the file in the patch. If the patch file version is higher than what it is at file system level then only c-driver will copy that files.

How adpatch will know the file versions of the patch delivered files?

With each patch a file with name f.ldt is delivered , which contain the file versions of the files delivered with the patch.
Adpatch will use this file to compare the file versions of files its delivering with the file on file system.


What is Single Sign-On Server (SSO) ?


What is Single Sign-On Server (SSO) ?
As name says Single-Sign On Server is set of services (Software) which enables login to Application once which will allow you to login to Ppartner Applications with no need to login again. Lets assume I have configured single SSO Server for Portal , E-Business Suite, Collaboration Suite plus some other other applications, Now if I login to any one of them & after that if I wish to login to other applications I should be able to login without supplying passwords again.

How will I log off then ?
This is called as Single Sign-Off which is part of SSO server , If you logout from any one application SSO server will log off from all applications.

What are Technology Stack components of SSO Server ?
SSO consist of OC4J_Security & HTTP Server which are part of Oracle Identity Management which inturn part of Oracle Infrastructure Server which in turn part of Oracle Application Server. SSO server uses Oracle Internet Directory to store User Credentials in encrypted format for Partner Applications . If some one ask you to bounce SSO server , you bounce either of them or both . Oracle components uses mod_osso which is part of Oracle HTTP Server to connect to SSO server.

Partner Application & External Applications ?
As mentioned above lot of time about Partner Applications ; Partner Applications are the one which delegates their authentication to SSO server (like Portal, Discoverer, E-Business Suite, Collaboration Suite) where as External Applications are applications which don't delegate their authentication to SSO Server (like yahoo, google, hotmail applications).

What does delegating Authentication means here ? Delegating authentication means partner application will ask sso to verify if a user is authenticated properly or not where as external application will check username/password at their end sso server will simply hold username/password in OID (If users select remember external application password)

Request Flow when SSO is used ...
Very important to understand request flow when a application is configured with SSO & user tries to access Application .
1) User first time tries to access application (like portal, collabsuite, apps 11i) configured with sso server
2) Application checks that there is no login cookie set into User(Clients) browser so Application redirects it to Single Sign-On Server via mod_osso
3) Single Sign-On Server returns login page to user & user enter his/her username/password
4) SSO validates these password against one stored in Oracle Internet Directory
5) If password matches then SSO return a token to client with list of all applications which user has access and return client back to original application
6) This token is stored as part of cookie in user's/client's browser & further connections from client to applications will be allowed (as authentication token is already in cookie)


How adpatch knows what are the pre-req’s for the patch which it is applying?


How adpatch knows what are the pre-req’s for the patch which it is applying?
Ans: With every patch a file called b.ldt file will be delivered which contain the pre-req information. adpatch load this into databse using FNDLOAD and check , whether those pre-req patches were applied or not.


Oracle EBS 11i versus R12


Outline of few major technical difference.
Database:
Database Version in 11i (11.5.9 & 11.5.10) was 9i Rel 2 where as in Release 12 its 10g R2 (10.2.0.2)

Application Tier:
Tech Stack in Application Tier consist of iAS(1.0.2.2.2) & Developer 6i (Forms & Reports 8.0.6) but in Applications R12 it is build on Fusion Middleware (10g Web Server and 10g Forms & Reports)

Sub component in Application Tier
A) HTTP Server or Web Server in R12 is Version 10.1.3 which is built on Apache version 1.3.34. In apps 11i it is Version 1.0.2.2.2 built on Apache Version 1.3.19
B) Jserv in apps 11i is replaced by OC4J (mod_jserv is replaced by mod_oc4j)
C) Forms Version 6i in Apps 11i is replaced by Forms 10.1.2.0.2 in R12
D) Reports Version 6i in Apps 11i is replaced by Reports 10.1.2.0.2 in R12
E) JDBC version is changed from version 9 in apps 11i to version 10.2.0 in Apps R12
F) modplsql or mod_pls is removed from Apps R12 (What will happen to my mod plsql applications- coming soon* )
G) Java processes use JDK/JRE version 1.5.0 in R12 against JDK version 1.3.1 or 1.4.2 in Apps 11i
H) Control Scripts are in new top ADMIN_SCRIPTS_HOME (R12) as compared COMMON_TOP/admin/scripts (11i)
I) New top INSTANCE_TOP added in Release 12 for all configuration and log files

Adadmin is not working how to enable maintenance mode oracle apps (EBS)


@$AD_TOP/patch/115/sql/adsetmmd.sql
You can also put your application in Maintenance mode from backend:
Enable Maintenance mode:
SQL> @$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
SQL> select fnd_profile.value(‘APPS_MAINTENANCE_MODE’) from dual; –> to check

Disable Maintenance mode :
SQL> @$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE
SQL> select fnd_profile.value(‘APPS_MAINTENANCE_MODE’) from dual;
3. Enabling and Disabling Maintenance Mode
Maintenance mode is Enabled or Disabled from adadmin.
When you Enable or Disable 'Maintenance Mode', adadmin will execute the script:

$AD_TOP/patch/115/sql/adsetmmd.sql sending the parameter 'ENABLE' or 'DISABLE' :

sqlplus /@adsetmmd.sql ENABLE | DISABLE

ENABLE - Enable Maintenance Mode .
DISABLE - Disable Maintenance Mode.

When adsetmmd.sql runs, it sets the Profile Option 'Applications Maintenance Mode'

(APPS_MAINTENANCE_MODE) to 'MAINT' to Enable 'Maintenance Mode' and to 'NORMAL' to Disable it.

4. Determining if Maintenance Mode is running
A quick way to verify if the Environment is on Maintenance Mode or not, is by checking the value of this
Profile Option as follows:
sqlplus apps/apps
SQL> select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
If the query returns 'MAINT', then Maintenance Mode has been Enabled and the Users will not be able to

Login. If the query returns 'NORMAL' then Maintenance Mode has been De-Activated and the Users will be able to use the application.

Note: Maintenance Mode is only needed for AutoPatch Sessions. Other AD utilities do not require

Maintenance Mode to be enabled. Maintenance Mode must be 'Enabled' before running AutoPatch and 'Disabled' after the patch application is completed.

When Maintenance Mode is disabled, you can still run Autopatch by using options=hotpatch on the command line, if necessary. However, doing so can cause a significant degradation of performance.


Bouncing Workflow mailer Oracle Apps (EBS)

The ‘WorkFlow Mailer Services in Oracle E-Business R12 , how we can start ,stop these services’

Goto system administrator -> Oracle application manager --> Workflow

Click on the SERVICES COMPONENTS UP logo

Click on the WORKFLOW MAILER SERVICE in the last of this list

Select the WORKFLOW AGENT LISTENER SERVICE and select the Start ALL in the combo or selection box (highlighted) and then click on GO button



SELECT component_name as Component, component_status as Status FROM fnd_svc_components WHERE component_type = 'WF_MAILER';

Sample output:

COMPONENT STATUS
---------------------------------------- -----------

Workflow Notification Mailer RUNNING

Step of register/deregister SSO


Go to $FND_TOP/bin

Remove Refrence OID
1. txkrun.pl -script=SetSSOReg -removereferencesoid=yes
enter goofy

Remove Reference SSO
2. txkrun.pl -script=SetSSOReg -removereferences=yes
enter sl1pp1ng
enter goofy

3.**BOUNCE APACHE**
cd $COMMON_TOP/admin/scripts/ (11i)
cd $ADMIN_SCRIPTS_HOME (R12)
adapcctl.sh stop
adapcctl.sh start
cd $FND_TOP/bin

DE-Register OID
4. txkrun.pl -script=SetSSOReg -deregisteroid=yes

De-Register SSO
5. txkrun.pl -script=SetSSOReg -deregistersso=yes

Register SSO
6. txkrun.pl -script=SetSSOReg -registersso=yes

Register OID
7. txkrun.pl -script=SetSSOReg -registeroid=yes -provtmp=$FND_TOP/admin/template/ProvOIDToApps.tmp



====Answer of the question asked while register or deregister SSO Services =====


Enter Oracle E-Business apps database user password ? xxxx

Enter Oracle E-Business SYSTEM database user password ? xxxx

Enter LDAP Host ? server01.company.local

Enter the application name used for registration of this application instance in OID ( 24 chars or less ) ? dfin

Enter the descriptive service name used for registration of this application instance in OID ( 80 chars or less ) ? dfin

Enter the LDAP Port on Oracle Internet Directory server ? 389

Enter the Oracle Internet Directory Administrator (orcladmin) Bind password ? xxxx

Enter the host name where Oracle iAS Infrastructure database is installed ? server01.company.local

Enter the Oracle iAS Infrastructure database port number ? 1521

Enter the Oracle iAS Infrastructure database SID ? SSODB

Enter Oracle iAS Infrastructure database ORASSO schema password ? BrAQp68z

Enter the instance password that you would like to register this application instance with ? winter123

Enter the Oracle iAS Infrastructure database SID ? SSODB

Enter Oracle iAS Infrastructure database ORASSO schema password ? BrAQp68z


Enter E-Business Suite existing SSOSDK schema password or choose a password to use with the new SSOSDK schema if the schema does not exist ?