Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is transaction ID unique for the life of a DB?

Re: Is transaction ID unique for the life of a DB?

From: Yong Huang <yong321_at_yahoo.com>
Date: 15 Feb 2003 15:55:50 -0800
Message-ID: <b3cb12d6.0302151555.547a71f5@posting.google.com>


JusungYang_at_yahoo.com (Jusung Yang) wrote in message news:<130ba93a.0302141608.7126140f_at_posting.google.com>...
> I did notice from the output, Yong, that the combination of 3 numbers
> are indeed unique. My conclusion was based on the thought that ORACLE
> has no reasons of keeping track of the transaction ID (not SCN) of
> either committed or rollbacked transactions. Therefore one can not
> base application design on the assumption that they will be unique for
> the "lifetime" of a database.
>
> Dropping and re-creating rollback segments may indeed cause a few
> transaction IDs to be recycled. This can certainly happen during the
> "lifetime" of a database. Actually, it has less to do with "lifetime"
> of a database and more to do with number of transactions the database
> executes. My guess is that the # of unique transaction ID ORACLE can
> create is
>
> (# of rollback segments)*(# of slots in the RBS TX table)*(max
> sequence value)
>
> Form what I can tell, there are 20 slots in the RBS TX table. Assuming
> you have only one rollback segment, the max # of unique transactions
> IDs will be
>
> 20*(max sequence value)
>
> Forget about "lifetime". If the database executes 20*(max sequence
> value) of transactions a day or an hour, I would bet transaction IDs
> will recycle. And I think ORACLE uses the "CYCLE" clause for the
> sequence so no error will be generated when the sequence hits the max
> and recycle.

I found David's question on Metalink he posted at the same time as he posted to this newsgroup. For the benefit of all newsgroup readers, it's http://metalink.oracle.com/metalink/plsql/ml2_documents.showFOR?p_id=336635.995&p_showHeader=1&p_showHelp=1

BTW, why do you say Oracle is *not* keeping track of XIDs? It keeps track of that as well as SCNs. It's just that SCNs will never, practically speaking, be exhausted while XIDs will.

Yong Huang Received on Sat Feb 15 2003 - 17:55:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US