Home » SQL & PL/SQL » SQL & PL/SQL » sql text
sql text [message #231934] Wed, 18 April 2007 21:03 Go to next message
kaisy.lin
Messages: 12
Registered: April 2007
Junior Member
how can i find out all the sql text that requested from all the client
i find out that there are a lots of views "v$sqltext , v$sql_text_withnewline"
Re: sql text [message #231937 is a reply to message #231934] Wed, 18 April 2007 21:12 Go to previous messageGo to next message
BlackSwan
Messages: 25049
Registered: January 2009
Location: SoCal
Senior Member
>how can i find out all the sql text that requested from all the client
Interesting question.
1) analyze all the source code of the application.
2) You might be able to capture all the SQL, but I suspect the application performance would noticably degrade as a result.
I would not want the assignment to attempt to do so.
Re: sql text [message #231940 is a reply to message #231934] Wed, 18 April 2007 21:36 Go to previous messageGo to next message
kaisy.lin
Messages: 12
Registered: April 2007
Junior Member
thank you for your reply.
bug i have another opnion.
i mean , what dose application server do is post the final sql text to database server ,and then dbms will parse that sql text.

so , both database server and application server will get the final sql text

i want to get this final text by using funciton of dbms.i thought there would be a area to hold all the sql text.

i am not so sure wether my opnion is right or not , so,please give me your opnion.thanks
Re: sql text [message #231941 is a reply to message #231934] Wed, 18 April 2007 21:45 Go to previous messageGo to next message
BlackSwan
Messages: 25049
Registered: January 2009
Location: SoCal
Senior Member
You can query V$SQLTEXT all you want.
How do you determine if you have already saw a given SQL statement or if the SQL statement is new since the last time the query ran?
How frequently do you have to query to be sure you never miss a SQL statement?
What is the minimum duration any single SQL statement will stay in V$SQLTEXT?

What business problem are you really trying to solve?
Re: sql text [message #231978 is a reply to message #231934] Thu, 19 April 2007 00:18 Go to previous messageGo to next message
kaisy.lin
Messages: 12
Registered: April 2007
Junior Member
the sqltext in view v$sqltext is not the completely text that i want .

Because the sql issued in our web application (servlet ) is not so easy to capture. All the sql is created by code.but it is hard to trace in the code .and most of the issue was caused by the data inconsistency .

According to a lots of issues, i think it is more efficient to look inot the data firstly.


Re: sql text [message #232049 is a reply to message #231978] Thu, 19 April 2007 03:42 Go to previous message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
One option do go would be to use SQL Trace and then tkprof to analyze the output.

See the Oracle Documentation :

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/sqltrace.htm
Previous Topic: connecting problem
Next Topic: problem with insert in procedure !!!!!
Goto Forum:
  


Current Time: Fri Dec 09 11:49:18 CST 2016

Total time taken to generate the page: 0.10487 seconds