Solved

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

Posted on 2006-06-13
6
293 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
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
JJSmith earned 250 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 124
word0 challenge 3 78
C# code editing and collaboration 3 98
Auto-indent certain lines in Notepad++ 10 20
A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now