Re: Trace COMMIT/TRANSACTION

From: Randolf Geist <mahrah_at_web.de>
Date: Wed, 29 Dec 2010 02:14:29 -0800 (PST)
Message-ID: <39f20997-5a27-4955-afaf-e5577fcb6e07_at_l17g2000yqe.googlegroups.com>



On Dec 28, 12:55 pm, valigula <valig..._at_gmail.com> wrote:
> Is it possible to trace commit's in oracle 11g ?,  A process is
> inserting data into several database tables using hibernate, i would
> like to check if commit is done one time per all the inserts or one
> per every one.
>
> I have activated the sql_traces/tkprof, but the stats  i am gaining
> are referring to every query and not to the transaction.

The information about the transactions is actually contained in the trace files, it is just a shortcoming of TKPROF to omit this information from the analysis. If you run the trace file through other trace file profilers like OraSRP or TVD$XTAT these will show you the number of transactions covered by the trace file.

You can also simply open the raw trace file and look for the "XCTEND" keyword which will show you exactly where a transaction ended and also tell you with "rlbk=0" or "rlbk=1" if this was a commit or rollback (and also if it was a read-only transaction or not - meaning in this case if the transaction actually modified anything in the database or not with the "rd_only" attribute).

Regards,
Randolf

Oracle related stuff blog:
http://oracle-randolf.blogspot.com/

Co-author of the "OakTable Expert Oracle Practices" book: http://www.apress.com/book/view/1430226684 http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684 Received on Wed Dec 29 2010 - 04:14:29 CST

Original text of this message