Thursday, July 25, 2013

Enabling Trace in Oracle Reports(RDF)

You can trace precisely in two ways:
1. Put this in before report trigger.
SRW.DO_SQL ('alter session set events=''10046 trace name context forever, level 4'' tracefile_identifier=''REPORT')

2.
i) Open your report (.rdf) in with Report Builder 6i.
ii) Choose Tools > Trace.
iii) Select All.

Recompile the report and place in Unixbox.

Follow the below procedure if your report is 10.7
1. Convert the report from rdf to rex:
$ORACLE_HOME/bin/r25convm batch=yes userid=> stype=rdffile source=REPORT_NAME.rdf dtype=rexfile overwrite=yes
2. Edit the rexfile and search for the beforerep trigger in the report.
Locate the following code:
IF (:p_trace_switch = 'Y') THEN
SRW.DO_SQL('alter session set sql_trace TRUE');
END IF;
Comment out the IF and END IF lines.
3. Save the report.
4. Convert the report from rex to rdf:

It would definitely generate the trace file. Look for the trace file in the following with the timestamp you started executing the report.
select value from V$PARAMETER where name = 'user_dump_dest'


Source: https://forums.oracle.com/thread/2453167
Related Posts Plugin for WordPress, Blogger...