Re: How to vew SQL queries received from external application
Date: Tue, 5 Mar 2013 17:30:27 -0800 (PST)
Message-ID: <f8320d1b-f69d-4817-adad-d6c65a0288f5_at_oz4g2000pbc.googlegroups.com>
On Mar 5, 4:32 pm, Yaq <vrcat..._at_gmail.com> wrote:
> Hi, I'm new to Oracle and working a solution that having Oracle talks to an external application. The external application sends some sql queries to Oracle db. I don't own this external application, so I need to find out what exact sql queries are sent. Can anyone tell me how to view these queries please?
> Many thanks in advance.
There are many answers, version dependent. Through the sqlplus command line, you can look at various views explained in the manuals available at tahiti.oracle.com. Through enterprise manager, you can look at the cursors sessions have open, and there are also extra cost tools for performance tuning. You can also set up login triggers to trace particular users (and there are a number of variants on that). Tracing can require some advanced understanding, though.
Some people like sqldeveloper, see
http://www.thatjeffsmith.com/archive/2012/07/customizing-monitor-sessions-in-oracle-sql-developer/
for some example.
Remember, Oracle has some nifty things built in for scaling and sharing data, so you should also read the concepts manual. For this kind of question, you need to understand how the shared pool parses and keeps queries. Oracle can change queries in some cases, and the optimizer can do cool things too.
jg
-- _at_home.com is bogus. http://www.computerworld.com/s/article/9237330/Oracle_pulls_Java_6_plug_but_Apple_likely_to_keep_patching_OS_X_Snow_LeopardReceived on Wed Mar 06 2013 - 02:30:27 CET