Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, david.

Asked: September 07, 2018 - 5:51 am UTC

Last updated: September 27, 2018 - 4:27 pm UTC

Version: 12.2.0.1.0

Viewed 1000+ times

You Asked

I am wondering how does SKIPEMPTYTRANS work? when does ogg judge a transaction empty or not?
if it does the judgement in the middle transction? how does ogg know it's a empty transaction? provided that it did not update mapped tables before the judgement, but it may update the mapped tables later, so it's a not empty transaction.

if ogg judge a empty transction until the end of a transaction,why do we need this parameter SKIPEMPTYTRANS? it's already the end ,just commit or rollback. could you explain a bit more on this? thanks!


SKIPEMPTYTRANS option will force extract to skip the long running transactions as defined by the criteria set forth in preceding parameters that has no replicated record and is the oldest transaction. If the oldest transaction in memory does contain records to be replicated, then no transaction will be skipped no matter how old they are until the oldest transaction has been committed or rolled back. This parameter does the same as issuing the SKIPTRANS, GGSCI command except you avoid having to issue separate SKIPTRANS commands for every transaction. Extract checkpoint will be updated upon skipping any long running transaction.

Reference : How to Exclude Empty Transactions From GoldenGate Extract Capture? ( Doc ID 1389353.1 )

and we said...

SKIPEMPTYTRANS is an option of the parameter WARNLONGTRANS which is used with the Classic Extract (CE). It is used to help identify transactions that may have been open for a desired period of time. Mostly see this with customers who use TOAD IDE and leave their session open for extended periods of time.

In summary, here is what the option does:

When adding the SKIPEMPTYTRANS (WARNLONGTRANS 4H SKIPEMPTYTRANS), the parameter is determining the difference between the timestamp from the start of the transaction vs the classic extract last read timestamp. If the difference is greater than it is considered as a "long running transaction" (4 hours in this example),
the transaction is empty (no interested record captured), and if user has specified "SKIPEMPTYTRANS", then
the transaction is skipped.

Rating

  (2 ratings)

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

Comments

david li, September 21, 2018 - 1:35 am UTC

thanks for your explaination!
how can I understand about "the transaction is empty" here?
an empty transaction is a transaction that hasn't do anything since it connects or a transaction that does not do any DML (possiblely run select query)?


so SKIPEMPTYTRANS also has the risk of losing data possiblely,right? though it's a empty transaction in the first 4 hours, but it may update data in the fifth hour, so that mean the updates will be skipped
Bobby Curtis
September 27, 2018 - 4:27 pm UTC

Please remember that Oracle GoldenGate only processes committed transactions.

If you are sitting idle for 4 hours, and not committed a transaction; then nothing is lost.

If you are sitting idle for 4 hours, and then commit after the 5th hour, the transaction would be captured, shipped, and applied.

This parameter is used to help identify psudo long running transactions and identify if the transaction has done nothing.

david li, September 28, 2018 - 1:30 am UTC

thanks for your reply!
I am still confused that how does goldengate know it's a empty session or not?
for example, there are two transactions:
1. idle for 4 hours, then update and commit at fifth hour
2. idle all the time (empty transaction)

goldengate reads log from the begining to end,and it need to make decision to decide it's a empty transaction or not at the fourth hour(let's assume the skipemptytransaciton=4 hours here), right? but how does goldengate know to skip or not? because two transactions are the same for goldengate at this moment.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database