Thursday, 22 August 2013

TKPROF generation for concurrent request and forms runtime diagnostics


TKPROF

Tkprof generation for concurrent request
First find the trace id and trace file by running this query
sql > column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off

sql > SELECT 'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name:
'||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id||'.trc',
'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running')
||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#,
'Module : '||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;

It prompts for request_id

once request id given it shows the trace file location for the requested request_id

Now from the trace file we can generate tkprof file by using the following command

Then  use this command  to get tkprof output file
$tkprof PATCH_ora_1652.trc output_file.prf explain=apps/hotspring sort=(exeela,fchela) sys=no

Tkprof generation for forms runtime diagonistics
Generate trace files for forms
Go to system administrator responsibility-> system-> profile
Profile option 'ICX: Forms Launcher'
set this profile option for user level
ie click SITE and USER checkbox
To check if forms is implemented in socket /servlet mode perform the following steps:
Open the appsweb.cfg file pointed by environment variable "FORMS_WEB_CONFIG_FILE" and check the values for following parameters:
  • serverURL=
  • connectMode=
In servlet mode
In Socket mode
serverURL=/forms/lservlet
connectMode=servlet
serverURL=(should be blank)
connectMode=Socket

profile value is according to connect mode

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

Save this change at the USER level.

You may need to bounce Apache for profile level changes to take effect
Now trace file is generated then you can run tkprof command for generating tkprof file


No comments:

Post a Comment