How to use an Oracle rollback segment

Source: Internet
Author: User
Tags ranges rollback

1. Use multiple rollback segments

Use multiple rollback segments to share contention for rollback segments to improve system performance. The system uses loops to allocate the rollback segment. When Oracle creates a database, the system automatically allocates a system rollback segment to complete the transaction of systems and is not shared by everyone. So the system can finally have at least one rollback segment to hold the user rollback information.

The number of user rollback segments that the system can load is related to the following initialization parameters:

Transactions_per_rollback_segment Specifies the number of concurrent supports per rollback segment;

Max_rollback_segments indicates the number of rollback segments supported by the system for the largest online;

rollback_segments Specifies the rollback segment required when the instance is started;

2. Select the type of rollback segment

Private must be specified by the instance after the name can be used.

For example, the instance must be rollback_segments specified in the initialization parameter before it can be used, or online before the instance is started.

Public is the system automatically discovered when the instance is started, and the system decides the rollback segment when the system starts up according to the initialization parameters.

3. Specify rollback segment for transaction

Specify the required rollback segment when the system starts.

4, estimate the size of the rollback segment

The rollback segment size should be based on the system's largest transaction. If the rollback segment is too small, it can easily produce a ora-01555 error. You can use the Optimize option to limit the rollback segment Auto Recycle. The rollback segment size should be 10% of the maximum table size, which can specify the number of maxextents.

5, create the range size and number of equal roll back segment group

Generally, a rollback segment should contain 10 to 20 ranges.

s=t/n

S is the size of the range defined during initialization, T is the initialization rollback segment size, and n is the range number. This allows you to determine the parameters of the clause that defines the rollback segment.

6, define the value of optimal

Setting this parameter prevents the rollback segment from expanding indefinitely and the system automatically reclaims space. The smallest size is two ranges.

Set the rollback segment in a different table space

1: If the system has only one rollback table space, then the rollback segment problems, affecting the system can not run.

2: The table space containing the rollback segment is often allocated and matched to produce fragments easily.

3: When the rollback table space is offline, the system will not roll back the table space to use.

Minextents minimum equals 2

Optimal minimum should be set to two extents size

Initial and next are best, except that the application uses the specified rollback segment.

7, and rollback segment related performance view

Dba_rollback_gegs: Describes the rollback segment information, including the rollback segment name and tablespace;

Dba_segments: Describes the additional information of the rollback segment;

V$rollname: Lists the name of the online rollback segment

V$rollstat: Statistics that contain rollback segments

V$transaction: Contains undo statistics

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.