Home » RDBMS Server » Performance Tuning » New Trace File (Oracle 11g R1)
New Trace File [message #519312] Thu, 11 August 2011 01:14 Go to next message
rchenna
Messages: 25
Registered: February 2008
Junior Member
Hi all,

I need to take the database trace of each page of my web application. I am giving the following commands.

BEGIN
dbms_monitor.session_trace_enable(session_id=>122, serial_num=>NULL, waits=>true, binds=>true);
END;

Accessing the web application. Once it renders completely, I am executing the following command.

BEGIN
dbms_monitor.session_trace_disable(session_id=>122);
END;

In the user_dump_dest folder, I am expecting to see a new trace whenever I execute these commands. But the same trace file is getting updated. How do I make oracle to create a new trace for each iteration. I am using Oracle 11g Release on CentOS 5.x

Thanks in advance
Re: New Trace File [message #519313 is a reply to message #519312] Thu, 11 August 2011 01:17 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to EXIT (for example, from SQL*Plus to operating system command prompt).
Re: New Trace File [message #519319 is a reply to message #519312] Thu, 11 August 2011 01:25 Go to previous messageGo to next message
rchenna
Messages: 25
Registered: February 2008
Junior Member
I am actually getting the SQL statements associated to a web page and I can't stop the application.
Re: New Trace File [message #519321 is a reply to message #519312] Thu, 11 August 2011 01:33 Go to previous message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
By default, the trace file is for a whole session not one file per time you started the trace.
If you want to chane of trace file for the same session then set the tracz identifier:

alter session set tracefile_identifier = <logical session name>;

Regards
Michel

Previous Topic: nvl problem i think
Next Topic: Performance tuning for select statement
Goto Forum:
  


Current Time: Tue Apr 23 11:49:52 CDT 2024