How to clear Middle Tier cache in R12

Go to “Functional Administrator” responsibility à Select “Core Services” (If missing, assign ‘Functional Administrator’ responsibility to your account)

c1.jpg

OR

c2.jpg
Select “Caching Framework
Select “Global Configuration
Now click on “Clear cache
Click on “Yes” button to confirm
Click on “Apply” button to clear the cachec3.jpg

c4.jpg

 Source: How to Clear the Cache Using Functional Administrator? (Doc ID 759038.1)

 Note: If you have removed the _pages manually and are facing login issue that’s blank screen.
Use the ojspcompile.pl perl script to perform a manual pre-compilation of the JSP pages.The following command will compile all the JSP pages and build up the JSP cache again.
            perl $FND_TOP/patch/115/bin/ojspCompile.pl –compile –flush -p 2
This utility is also used by the AD utilities to perform this action such as when patches are applied that replace one or more JSP pages

See Note: JSP Pages Hanging in R12 After Removing Cached Class Files in _pages (Doc ID 433386.1)

Advertisement

How to enable Diagnostics in Oracle Applications R12

Users may not able to able to see Help >Diagnostics option or get an error “Function Not Available to this Responsibility. Please check with your system administrator.”

These profiles need to be set at user level. So specific user can access this functionality (ex. Support folks/Developers)

Navigation: Go to System Administrator responsibility
Profile> System

Profile Option Name: Utilities:Diagnostics
User Level: Yes

diag2.jpg

Profile Option Name: Hide Diagnostics menu entry
User Level: NO

diag1.jpg
Save changes
Have user logout of Oracle Application and login again

User should be able to access Help >Diagnostics Menu

diag3.jpg

 

Concurrent program to bounce Mobile Warehouse Applications (MWA)

Scope: Create a Concurrent program to bounce Mobile Warehouse Applications (MWA)

Shell Program for MWA Bounce on the Server

First, create a shell script on the Application server.

 #!/bin/bash
# mwa_bounce.sh 03/29/2016 RG

echo “Following are System Parameters”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
p0=$0
p1=$1
p2=$2
p3=$3
p4=$4
echo “1st System Parameter :”$p0
#echo “2nd System Parameter :”$p1
echo “3rd System Parameter :”$p2
echo “4th System Parameter :”$p3
echo “5th System Parameter :”$p4
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
echo “Following are User Parameters “
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
#u1=$5
#echo “1st User Parameter :”$u1
echo “~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”

echo “Stopping MWA Server via “$p0
echo
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop $p1
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh stop APPS

mail -s “Concurrent Request “$p4” Submitted to Bounce MWA by “$p3 ramesh.ganesan@mycompany.com< /dev/null

sleep 30

# Kill MWADIS

for pids in `ps -fu appldev|grep MWADIS|grep -v “grep”|awk ‘{print $2}’`
do
echo “forcing kill on MWADIS PID ${pids}”
kill -9 ${pids}
done

# Kill telnet
for pids in `ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $2}’`
do
#DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $15}’` # 11i
DTL=`ps -fu appldev|grep telnet|grep -v “grep”|awk ‘{print $17}’` # R12.2
echo “forcing kill on PID ${pids} for ${DTL}”
kill -9 ${pids}
done

sleep 30

echo “Starting MWA Server via “$p0
echo $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start APPS
echo
rm -rf /tmp/mwa_alert.txt
touch /tmp/mwa_alert.txt
nohup $ADMIN_SCRIPTS_HOME/mwactlwrpr.sh start $p1 |tee /tmp/mwa_alert.txt

# if the dispatcher isn’t free, email me

MWAERROR=`cat /tmp/mwa_alert.txt | grep “is not free to start the dispatcher”`

if [ ! -z “$MWAERROR” ]
then
echo $MWAERROR | mail -s “MWA Error” ramesh.ganesan@brakepartsinc.com
fi

Copy the program to $CUSTOM_TOP/bin and create Soft link

cd $XXBPI_TOP/bin
[appldev@uswodapp013 bin]$ ln -s /ua4001/appl/fnd/12.0.0/bin/fndcpesr mwa_bounce

Create Concurrent Program Executable

As SYSADMIN, define the Executable via Concurrent->Program->Executable

mwa1

Create Concurrent Program Definition

sysadmin, define the Executable via Concurrent->Program->Define

mwa2

Assign a Request Group

Security->Responsibility->Request

mwa3

Submit the Request and view Log file and verify Email

mwa4

 

Log file

mwa5

Email output

mwa6

Program Definition and Request Group can be downloaded and uploaded to other EBS instances with MWA

Program Definition Download

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt PROGRAM APPLICATION_SHORT_NAME=”XXBPI_MWA_BOUNCE” CONCURRENT_PROGRAM_NAME=”XXBPI_MWA_BOUNCE”

Upload

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct xxbpi_mwa_bounce_prgm.ldt

Request Group Download

FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxbpi_system_admin_reports_reqgrp.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”System Administrator Reports” APPLICATION_SHORT_NAME=”FND”

Upload

FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct xxbpi_system_admin_reports_reqgrp.ldt

adautocfg.sh and adcfglonce.pl dbconfig – fails with ORA-01157 Lock Datafile

When executed Auto config  and Clone Config after RMAN Duplicate, following error occured.

ERROR: InDbCtxFile.uploadCtx() : Exception : Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -1157: ORA-01157: cannot identify/lock data file 515 – see DBWR trace file
ORA-01110: data file 515: ‘+USUAT_DATA’ has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.oracle.apps.ad.autoconfig.oam.InDbCtxFileException: Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -1157: ORA-01157: cannot identify/lock data file 515 – see DBWR trace file
ORA-01110: data file 515: ‘+USUAT_DATA’ has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.

 

[orajzuat@usuatsrvdbd1bin]$ export PATH=/usr/bin:$PATH
[orajzuat@usuatsrvdbd1bin]$ perl adcfgclone.pl dbconfig /us9001/oracle/11.2.0/appsutil/bpijzuat_usuatsrvdbd1.xml

Beginning dbconfig Apply – Fri Jan 29 14:53:12 2016
…….
  |     30% completed       ERROR: InDbCtxFile.uploadCtx() : Exception : Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -1157: ORA-01157: cannot identify/lock data file 515 – see DBWR trace file
ORA-01110: data file 515: ‘+USUAT_DATA’ has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.
oracle.apps.ad.autoconfig.oam.InDbCtxFileException: Error executng BEGIN fnd_gsm_util.append_ctx_fragment(:1,:2,:3); END;: 1; Oracle error -1157: ORA-01157: cannot identify/lock data file 515 – see DBWR trace file
ORA-01110: data file 515: ‘+USUAT_DATA’ has been detected in FND_GSM_UTIL.APPEND_CTX_FRAGMENT.
        at oracle.apps.ad.autoconfig.oam.InDbCtxFile.uploadCtx(InDbCtxFile.java:249)
        at oracle.apps.ad.autoconfig.oam.CtxSynchronizer.uploadToDb(CtxSynchronizer.java:328)
        at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBCtx(FileSysDBCtxMerge.java:721)
        at oracle.apps.ad.tools.configuration.FileSysDBCtxMerge.updateDBFiles(FileSysDBCtxMerge.java:226)
        at oracle.apps.ad.context.CtxValueMgt.processCtxFile(CtxValueMgt.java:1690)
        at oracle.apps.ad.clone.ApplyDatabase.runCVM(ApplyDatabase.java:3058)
        at oracle.apps.ad.clone.ApplyDatabase.runCVMAndAutoConfig(ApplyDatabase.java:3003)
        at oracle.apps.ad.clone.ApplyDatabase.doConf(ApplyDatabase.java:649)
        at oracle.apps.ad.clone.ApplyDatabase.doApply(ApplyDatabase.java:473)
        at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:366)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
        at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
        at java.lang.Thread.run(Thread.java:637)
  –     30% completed
Completed Apply…
Fri Jan 29 14:54:23 2016
Starting database listener for bpijzuat:
Running:
/us9001/oracle/11.2.0/appsutil/scripts/bpijzuat_usuatsrvdbd1/addlnctl.sh start bpijzuat
Logfile: /us9001/oracle/11.2.0/appsutil/log/bpijzuat_usuatsrvdbd1/addlnctl.txt
You are running addlnctl.sh version 120.1.12010000.4
Starting listener process bpijzuat …
Listener bpijzuat has already been started.
addlnctl.sh: exiting with status 0
addlnctl.sh: check the logfile /us9001/oracle/11.2.0/appsutil/log/bpijzuat_usuatsrvdbd1/addlnctl.txt for more information …
[orajzuat@usuatsrvdbd1bin]$

Cause: This error occurs when there is missing or corrupted TEMP tablespace tempfile

Solution:  Drop and Re-create Tempfile.

Current Temp Tablespace:

select file#,name,ts# from v$tempfile;

FILE# NAME  TS#
1     +USUAT_TMP/usuat/tempfile/temp3.257.902419859   292
2     +USUAT_TMP/usuat/tempfile/temp4.256.902419677   393

select name from v$tablespace where ts# in (292,393)

NAME
Temp1
Temp2

We can see the same error when trying to select the size of the tempfile

select file_name,bytes/1024/1024/1024 from dba_temp_files where tablespace_name=’TEMP1′;

select file_name,bytes/1024/1024/1024 from dba_temp_files where tablespace_name=’TEMP2′;

–ORA-01157: cannot identify/lock data file 513 – see DBWR trace file
–ORA-01110: data file 513: ‘+USUAT_DATA’

 Note: Same error as the adconfig

Create temporary tablespace TEMP3 tempfile ‘+USUAT_TMP’ size 20G;

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp3;

drop tablespace TEMP1;

drop tablespace TEMP2;

Now run adautocfg.sh….SUCCESS…. 

 

 

Enable Trace for Concurrent Programs in Oracle Apps R12

Tracing the Concurrent program is very good option to Debug any issue while running the concurrent program.

Goal :
To enable the Trace for Concurrent Programs
To Debug the issues in Concurrent Programs or its dependent objects.

Solution :
1. Goto Concurrent Program Definition

Application Developer –> Concurrent –> Program –> check Enable Trace

Query your concurrent program and check the Enable Trace check box at the bottom of the screen.

2. Set the Profile Concurrent: Allow Debugging to YES.

3. Navigate to the Responsibility from where you are running the program.

4. Before Submitting the Concurrent Program in Submit Request screen there will be an option like Debug Options click on that button.

5. In the Debug Options select the SQL Trace and enable Trace with binds.

6. Submit the Concurrent Program and note down the Request id.

7.Trace file name will always be post fixed with oracle_process_id.To get the oracle_process_id use the below SQL
Select oracle_process_id from fnd_concurrent_requests where request_id= &Request_id;

8.And the Trace file path can be derived using the below SQL
Select * from v$parameter where name=’user_dump_dest’;

9. Get the trace file to your local machine.Understanding the raw trace is very complex so use TKPROF utility to make the Trace file readable.

10. Open the Command Prompt and run the below command
TKPROF < Trace File_Name.trc> <Output_File_Name.out> SORT=fchela

11.A new outfile will be generated with the name given in the above command.Analyse the Output file to know the answers for your problem.

Sql queries to find the log files by Request id
select req.oracle_process_id tracename, req.request_id, req.requested_by,usr.user_name, prog.user_concurrent_program_name, req.request_date, req.phase_code, req.status_code, req.logfile_name , req.outfile_name, dest.value as user_dump_dest from apps. fnd_concurrent_requests req, gv$parameter dest, apps.fnd_concurrent_programs_vl prog, apps.fnd_user usr
where  req. concurrent_program_id = prog.concurrent_program_id
and req.requested_by = usr.user_id
–and request_id like ‘6013239’
and dest.name= ‘user_dump_dest’
and request_id like & Request_id;
Sql query find the log files by username
select req.oracle_process_id tracename, req.request_id, req.requested_by,usr.user_name, prog.user_concurrent_program_name, req.request_date,  req.phase_code, req.status_code, req.logfile_name , req.outfile_name, dest.value as user_dump_dest 
from apps. fnd_concurrent_requests req, gv$parameter dest, apps.fnd_concurrent_programs_vl prog, apps.fnd_user usr
where  req. concurrent_program_id = prog.concurrent_program_id
and req.requested_by = usr.user_id
–and request_id like ‘6013239’
and dest.name= ‘user_dump_dest’
and usr.user_name like ‘Ramesh%G%’
order by request_date desc
Select oracle_process_id from fnd_concurrent_requests where request_id = &Request_id;
 
select * from apps. fnd_concurrent_requests req,gv$parameter dest , apps .fnd_concurrent_programs_vl prog where  req. concurrent_program_id = prog.concurrent_program_id and request_id like ‘601300%’
and dest.name= ‘user_dump_dest’

Enable Forms Diagnostics, Tracing in R12 using Profile Option

This document shows how to use Forms Runtime Diagnostics using Profile Option at user level.

  1. First verify if Forms using Socket or Servlet.
  • Login on to Application Server, and check the cfg file to verify the “serverURL=”And “connectMode=” settings.
  • In Servlet Mode:
    serverURL=/forms/lservlet
    connectionMode=servlet
  • In Socket Mode:
    serverURL=<blank>
    connectionMode=Socket

1.1

  1. Enable Forms Runtime Diagnostics (FRD)

FRD can be enabled in one of the following methods:

  • Option 1: Obtain FRD Trace Using Profile Options
  • Option 2: Obtain FRD Trace Using Appsweb.cfg
  • Option 3: Obtain FRD in an ADHOC way

We will be using method “Obtain FRD Trace Using Profile Options” in this example.

To start tracing, please modify Profile Option ‘ICX: Forms Launcher’ at USER level to include the Forms parameters required for FRD logging (Note: This should not set at SITE LEVEL)

2.1: Add the trace value “ ‘?record=collect’  “ to Apps URL for profile option ‘ICX: Forms Launcher’

In Servlet Mode:https://hostname.domain:port/forms/frmservlet?record=collect
in Socket Mode:https://hostname.domain:port/OA_HTML/frmservlet?record=collect

1.2

Copy the site level value for profile option ‘ICX: Forms Launcher’ and append values’?record=collect’. Past it at the user level.

Ex. Site Value: http://bpiebsprds.brakepartsinc.com:80/forms/frmservlet
Modified Value: http://bpiebsprds.brakepartsinc.com:80/forms/frmservlet?record=collect

Copy the modified value to the User level and Save.

1.5

  1. Login into Oracle Applications and launch forms via self-service. Navigate through the steps to capture trace.

Should get below prompt when you login to Form.

1.3

  1. Obtain the Trace File. It’s in $FORMS_TRACE_DIR, where<pid> is the process identifier.

Ex: $FORMS_TRACE_DIR/collect_6540

<Sample Output file>

1.4

Source:R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications (Doc ID 438652.1)