Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL profiler

725410Nov 4 2009 — edited Nov 4 2009
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
===
Morning all.

I’m trying to find a way to set up an SQL trace (similar to SQL Profiler under SQL Server) through the Oracle Enterprise Manager.

I’ve managed to do this 'manually', outputting to a file with the following:

To get the process I want I execute:

select sid, serial#, username, status, process from sys.v_$session where username = 'MYUSER'

Then at the command line:
sqlplus
/ as sysdba;
execute dbms_system.set_sql_trace_in_session(94, 10, true);
Alternatively I can also do it 'globally' with the following but this produces lots of trace files...
alter session set sql_trace = true;
These successfully produce trace file(s) in my C:\oracle\diag\rdbms\...\trace directory.

I'm sure there is a way though of setting this up and viewing it graphically in real time (just as you can with SQL Profiler under SQL Server) through the Oracle Enterprise manager but I am having no luck.

If I select the Performance tab, scroll down to Additional Monitoring Links and choose SQL Monitoring, this looks like what I am looking for but how do I get it to show the SQL actioned against the database/schema? -
i.e. I run a SELECT statement in SQL Developer and want to see this in the SQL Monitor?, when I do this though it doesn't pick it up.

I'm tearing my hair out here, looked(am looking) at all the docs I can find but I can't see much on the subject at all.

Thanks greatly for any help on this.

Andy
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2009
Added on Nov 4 2009
4 comments
911 views