[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Oracle Forms 6.0 - How to see sql statements that Oracle sends on behalf of user

Posted on 2006-06-13
6
Medium Priority
?
332 Views
Last Modified: 2010-04-17
Hi Experts,
How can I see the sql statement that Oracle forms automatically sends when the user is entering data. Is there any trigger or a built-in I can use?
If I can see those sql statements, it will help me find a problem where I believe Oracle is sending a malformed sql statement to the database.
0
Comment
Question by:uzairp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
JJSmith earned 1000 total points
ID: 16899093

Get someone (DBA) to trace at the database end.

Use a join on v$sql and v$session

for example:

select SQL_TEXT from v$sql where HASH_VALUE in ( select SQL_HASH_VALUE from v$session );

this will return the last query executed for each current session; you can add more predicate is you want to filter by a particular scema/username for example:

DESC V$SQL
DESC V$SESSION


Cheers
JJ

0
 
LVL 3

Expert Comment

by:hardikbeit
ID: 16901693
U can also trace the queries by

select s.username,l.sql_text
from dba_users s, v$sql l
where s.user_id = l.parsing_user_id

this will give user name/sql query.. U can also add some more filters like owner/time..
0
 

Author Comment

by:uzairp
ID: 16903733
I tried both of the sql but I get so many rows returned. Could I possibly limit the output to last few rows?

Also do you know if there is any way to see the outgoing sql from the Form before it goes to the server? Thanks
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:JJSmith
ID: 16906957


To reduce the number of rows simply add more 'filter' conditions: like a guess at the code:-

AND  UPPER(SQL_TEXT) LIKE '%FROM TABX%'


To monitor outgoing statements from your form to server is starting to get a bit 'networky' - please browse:

http://www.slac.stanford.edu/xorg/nmtf/nmtf-tools.html

you might find information on monitoring your forms client connection.

Cheers
JJ
0
 
LVL 3

Expert Comment

by:hardikbeit
ID: 16908790
Hi,
One more tool available like 'SQL Monitor' which gives SQL running by Form 6. I used this tool so many times and it is powerful tool to find out background queries which run through Oracle Forms.
0
 
LVL 6

Expert Comment

by:JJSmith
ID: 16909431

You can try SQL Monitor for free:


http://www.toadsoft.com/downld.html


Cheers
JJ
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Introduction to Processes
Starting up a Project

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question