dbTalk Databases Forums  

Trace COMMIT/TRANSACTION

comp.databases.oracle.server comp.databases.oracle.server


Discuss Trace COMMIT/TRANSACTION in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
valigula
 
Posts: n/a

Default Trace COMMIT/TRANSACTION - 12-28-2010 , 05:55 AM






Hi All,

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.

Do i need to use AWR ? or any other tool?

Thanks in advance

Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-28-2010 , 08:03 AM






On Tue, 28 Dec 2010 03:55:01 -0800, valigula wrote:

Quote:
Hi All,

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.

Do i need to use AWR ? or any other tool?

Thanks in advance
V$SESSION_EVENT should tell you how many times you were waiting for "log
file sync". Alternatively, V$SESSTAT should tell you the number of "user
commits". Accounting for the number of batches/inserts is the application
responsibility. Being a DBA, I don't know much about Hibernate, but there
must be a way to do explicit commits and turn off any possible implicit
ones.



--
http://mgogala.byethost5.com

Reply With Quote
  #3  
Old   
valigula
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-29-2010 , 03:03 AM



Thank you all,

About the trace file i saw the file being generated but did not know
where it came from, thanks for the hint. I will find out for the AWR
license stuff.

At the moment using the v$session_event i can see the "log file sync"
increase, so it looks as it is working on batch.

Thanks for the hints

Reply With Quote
  #4  
Old   
Randolf Geist
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-29-2010 , 04:14 AM



On Dec 28, 12:55*pm, valigula <valig... (AT) gmail (DOT) com> wrote:
Quote:
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-.../dp/1430226684

Reply With Quote
  #5  
Old   
John Hurley
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-29-2010 , 02:17 PM



Joel:

# Now even though management is entirely unwilling to give Oracle any
more money than they have to, my immediate management does understand
why I would want to license and use AWR - pretty pictures can be a lot
more convincing than dry lists of numbers, and I think it is a useful
performance tool. *How do I get free AWR licensing in a support-
renewal only situation with a dick salesperson? *I'm under the
impression the list price is just way out of line, though it's been a
long time since I've even tried to figure it out.

One way to try to approach it is to work thru an Oracle Sales Partner
instead of directly with Oracle.

The AWR stuff needs Enterprise Edition with the Tuning and Diagnostic
packs.

Reply With Quote
  #6  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-29-2010 , 09:02 PM



On Wed, 29 Dec 2010 12:17:00 -0800, John Hurley wrote:


Quote:
The AWR stuff needs Enterprise Edition with the Tuning and Diagnostic
packs.
Which comes at bargain price of $10,000/CPU.



--
http://mgogala.byethost5.com

Reply With Quote
  #7  
Old   
Noons
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-30-2010 , 03:16 AM



Mladen Gogala wrote,on my timestamp of 30/12/2010 2:02 PM:
Quote:
On Wed, 29 Dec 2010 12:17:00 -0800, John Hurley wrote:


The AWR stuff needs Enterprise Edition with the Tuning and Diagnostic
packs.

Which comes at bargain price of $10,000/CPU.


Guess why I stuck with Statspack?

Reply With Quote
  #8  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-30-2010 , 12:05 PM



On Wed, 29 Dec 2010 02:14:29 -0800, Randolf Geist wrote:

Quote:
f 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.
Speaking of the orasrp, Egor has released the version 4.0.0 beta on
10/31/2010. This version has some significant improvements over the
previous versions, like remote analysis or analysis from gzipped trace.
Thanks Egor, keep up the good work! Session resource profiler is awesome!



--
http://mgogala.byethost5.com

Reply With Quote
  #9  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Trace COMMIT/TRANSACTION - 12-30-2010 , 12:06 PM



On Thu, 30 Dec 2010 20:16:32 +1100, Noons wrote:


Quote:
Guess why I stuck with Statspack?
Me too. The fact that AWR report is not free is my pet peeve, I use it as
an argument when commenting on Oracle business practices to my management.



--
http://mgogala.byethost5.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.