# Toad Session Browser

**URL:** <https://forums.toadworld.com/t/toad-session-browser/37837>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [June 8, 2016, 9:52pm UTC](https://forums.toadworld.com/t/toad-session-browser/37837 "2016-06-08T21:52:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parth\_Modi](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@Parth\_Modi](https://forums.toadworld.com/u/Parth_Modi)\
**Post date:** [June 8, 2016, 9:52pm UTC](https://forums.toadworld.com/t/toad-session-browser/37837/1 "2016-06-08T21:52:57Z")

</div>

Hello,

I am using Oracle Database 11g Release 11.2.0.4.0.

I have one application which is calling one Procedure Query from Back End. When this query called, my application get stuck.

And Toad Session browser is showing me that this query is running.

But when I take that query from session browser and Pass same parameter as passing from Application, Query execute in miliseconds.

Can you please suggest us what can we do in this case?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [June 8, 2016, 11:52pm UTC](https://forums.toadworld.com/t/toad-session-browser/37837/2 "2016-06-08T23:52:39Z")

</div>

In a word, trace it.

Use Toads Session Browser to find the session that you know will get stuck, start tracing and then leave it to runt until stuck, then a wee bit longer, then stop the trace and see what it shows.

If you don’t have the DBA Module which provides the session browser, then add the following code before and after your sticking query:

alter session set events ‘10046 trace name context forever, level 12’;

your query here

alter session set events ‘10046 trace name context off’;

This obviously requires your user to have ALTER SESSION privileges.

There are other ways such as calling dbms\_system or dbms\_monitor but the depend on certain versions of Oracle. For 11g you should/could use the following instead:

exec dbms\_monitor.session\_trace\_enable(waits=\>true, binds=\>false);

Your SQL here

exec dbms\_monitor.session\_trace\_disable;

This requires that your user has EXECUTE privilege granted on DBMS\_MONITOR.

Then you just need to check out the contents of the trace file. If you have the DBA Module in Toad, then you can use the trace file browser. Otherwise, it’s the “joy of hex” and you’ll have to trawl through the data looking for long waits etc. Or you could use tkprof I suppose!

Good luck.
