TRACE SESSION USING DBMS_APPLICATION_INFO [message #466236] |
Sun, 18 July 2010 07:38 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
Hi ,
We have an java based application with Database Oracle 10g on RAC and 6 application instance. Some time due to performance issue, we have to trace the queries and once we got the query,we can not trace it in appliaction, means this query is the part of which transaction, because different transaction use the same query.Say payroll transaction, in this transaction, in side the application java opens the connection fires some query and close the connection, again it took the connection and fires the query and close the connection, so it would be very tough for us to corelate the query with transactions.So can i use the dbms_application_info package to trace all the query of a single transaction of one user,because many user use the payroll trnsaction and fires the same query and in parallel say finacial posting may use the same query with different parameter , so we need to trace end to end set of queries which are part of a single user and single transaction. Appriciate if any one help me, because we are facing lots of problem issue and some time deadlock problem, but not able to trace the transaction, so that we can go in the particular transaction and see the set of queries.
Thanks
Prashant
|
|
|
|
|
Re: TRACE SESSION USING DBMS_APPLICATION_INFO [message #466251 is a reply to message #466236] |
Sun, 18 July 2010 10:22 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Is application a 3 tier application as described below?
user<=>browser<=>WebServer<=>ApplicationServer<=>DatabaseServer
Does application utilize connection pooling?
>because we are facing lots of problem issue and some time deadlock problem
Deadlock (ORA-00060) are automatically detected, resolved & logged by Oracle. Culprit SQL are contained in resultant trace file.
Deadlocks are caused by poor application implementation.
[Updated on: Sun, 18 July 2010 10:35] Report message to a moderator
|
|
|
|
Re: TRACE SESSION USING DBMS_APPLICATION_INFO [message #466256 is a reply to message #466252] |
Sun, 18 July 2010 10:54 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
See my problem is to identify all the sql which is part of transaction.. for example I have two transaction say payroll and Finacial Posting and in both the transaction we are using two update sql query with some bind variable and those two queries are written in xml file as our application in java. Now one user does the payroll transaction and both the query fires and in the same time another user does the financial transaction and the same query fires some different bind variable values, nowafter join gv$sql and gv$session table i found 4 query with 4 different sid, because in java we open the connection and get the connection pool and fire one update then close the connection and after some buisness logic again we open the connection and fire the next update, so as a result there would be 2 different sid , finally 4 query and 4 differnet sid , so it would be tough for me to identify which two sid is related to which transaction. So to make it possible I want to set the common module name of all the queries which are part of one transaction, i do not want to set the module name for every query , because it would be a very tedious job.
|
|
|
|
|
|
|
|
Re: TRACE SESSION USING DBMS_APPLICATION_INFO [message #466269 is a reply to message #466268] |
Sun, 18 July 2010 12:19 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>In this article I am getting something related to trace to sessions realted to connection pool
When connection pooling exists, a single transaction may span multiple sessions which greatly complicates single transaction tracing & the application must participate in any tracing solution.
|
|
|