Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to track all queries submitted to Oracle DB from app server? [duplicate]

Possible Duplicate:
Oracle: is there a tool to trace queries, like Profiler for sql server?

I am using JDBC to talk to Oracle. Are there any ways or external tools that I can track all SQL queries submitted to Oracle DB server from app server during one session? This should be very great debug / bug tracking tool.

like image 793
C.c Avatar asked Nov 25 '11 05:11

C.c


2 Answers

You can use JDBC (Enabling and Using JDBC Logging) logging feature.

like image 191
KV Prajapati Avatar answered Sep 21 '22 09:09

KV Prajapati


You can try JProfiler. Its JDBC probe shows you all SQL statements in the events view:

enter image description here

It works for all JDBC drivers, including Oracle's. Also, the hot spots view of the probe is useful to determine which queries take most of the time.

Disclaimer: My company develops JProfiler

like image 23
Ingo Kegel Avatar answered Sep 20 '22 09:09

Ingo Kegel