Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The ORA-01555 Error: A DBA Solution-2 : Page 2


advertisement
Understanding Rollback Segments
Before delving into this problem, let me first describe rollback segments in general. Rollback segments are involved in every transaction that occurs within a database. Since they control the database's ability to handle transactions, they play a key role in the database's successful operation.

Rollback segments capture the data image as it existed prior to the start of the transaction. Other users' queries against the data that is being changed will return the data as it existed before the change began. This feature allows the database to maintain read consistency between multiple transactions. The number and size of rollback segments available are specified by the DBA during the database's creation. Information about rollback segments status is accessible via the DBA_ROLLBACK_SEGS view.

A rollback segment consists of contiguous multi-block pieces called extents. In an ideal database, each transaction fits within a single extent. However, this is rarely the case. When a transaction can no longer acquire space within an extent, the rollback segment looks for another extent to which it can continue writing the rollback segment entry. The segment uses these extents in an ordered, circular fashion, moving from one to the next after the current extent is full. A transaction writes a record to the current location in the rollback segment and advances the current pointer by the size of the record. The current writing location for records is the head of the rollback segment. The term tail is used to refer to the location on the rollback segment that is the beginning of the oldest active transaction record.



It's also important to make sure that individual rollback segments are large enough to handle their transaction load. Oracle allocates rollback segments in a round-robin fashion among all online rollback segments (with the exception of SYSTEM) to try to spread transactions evenly.

Here are some simple rollback segment rules, per Oracle's documentation:

  • A transaction can only use one rollback segment to store all of its undo records.

  • Multiple transactions can write to the same extent.

  • The head of the rollback segment never moves into a rollback extent currently occupied by the tail.

  • Extents in the ring are never skipped over and used out of order as the head tries to advance.

  • If the head can't use the next extent, it allocates another extent and inserts it into the ring.
From these principles you can see that transaction time as well as transaction size is important. For instance, a transaction that only modifies one byte but waits a long period of time before ending could cause a rollback segment to grow if the extent it occupied is needed again.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date