Skip to Main Content
  • Questions
  • In Oracle Trace, XCTEND indicates the end of a transaction, what indicates its beginning?

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Hussein.

Asked: February 10, 2017 - 7:18 pm UTC

Last updated: February 11, 2017 - 3:01 am UTC

Version: 12 C

Viewed 1000+ times

You Asked

We know that a given oracle session we can contain many transactions, each transaction should have a beginning and an end and each wraps many queries within it. While analyzing an Oracle trace file I wanted to make sure that queries are correctly wrapped within their transactions to test the our software. In order to do that, I need to clearly find the beginning and the end of each transaction in the oracle trace file. I can see in the documentation that the marker XCTEND clearly indicates the end of a transaction but there are no markers that indicates the beginning of a transaction.

In an oracle trace files of thousand of lines those markers will be really useful.

I hope the question makes sense.

Thank you

and Connor said...

Sorry, there is no such marker. Because we only commence a transaction when we actually *need* to.

For example, the command:

delete from T where col = 12;

may start a transaction, but it may not.. (ie no rows match the predicate).

To do this, you would be reliant on your applications *own* instrumentation layer - which I hope is comprehensive :-) And if you instrumentation is taking advantage of the oracle supplied facilities (eg setting module/action etc) then those markers *will* be picked up in the trace file - so you would have it all in one place.

Is this answer out of date? If it is, please let us know via a Comment