1. Trang chủ
  2. » Công Nghệ Thông Tin

Manually Managing Undo Data (Rollback Segments) pot

19 146 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 19
Dung lượng 244 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

After completing this lesson, you should be able to do the following: • Create rollback segments using appropriate storage settings • Maintain rollback segments • Plan the number and si

Trang 1

B

Manually Managing Undo Data

(Rollback Segments)

Trang 2

After completing this lesson, you should be able to do the following:

Create rollback segments using appropriate storage

settings

Maintain rollback segments

Plan the number and size of rollback segments

Troubleshoot common rollback segment problems

Trang 3

Creating Rollback Segments

CREATE ROLLBACK SEGMENT rbs01

TABLESPACE rbs

STORAGE (

INITIAL 100K

MINEXTENTS 20

MAXEXTENTS 100

OPTIMAL 2000K );

Trang 4

Transactions and Rollback Segments

Transaction 1

Active extent Inactive extent

Transaction 2

Trang 5

Growth of Rollback Segments

Active extent Inactive extent

3 4

5

New extent

Trang 6

Shrinkage of Rollback Segments

Active extent Inactive extent

1

2 3

4 5

6

OPTIMAL

Trang 7

Bringing Rollback Segments Online

Use the following command to make a rollback

segment available:

Specify the following initialization parameter to

ensure that rollback segments are brought online at startup:

ROLLBACK_SEGMENTS=(rbs01, rbs02)

ALTER ROLLBACK SEGMENT rbs01 ONLINE;

Trang 8

How Instances Acquire Rollback Segments

Bring all acquired rollback segments

online.

Acquire

named private

rollback

segments.

Are there enough RBS’s?

Acquire public rollback segments.

Compute the required number

of rollback segments.

Yes

No

Trang 9

Changing Rollback Segment

Storage Settings

Use the ALTER ROLLBACK SEGMENT command.

You can change OPTIMAL or MAXEXTENTS.

ALTER ROLLBACK SEGMENT rbs01

STORAGE( MAXEXTENTS 200 );

Trang 10

Deallocating Space From

Rollback Segments

Use the ALTER ROLLBACK SEGMENT command.

If extents are active, they might not shrink to the

requested size.

ALTER ROLLBACK SEGMENT rbs01

SHRINK TO 4M;

Trang 11

Taking Rollback Segment Offline

Take a rollback segment offline to make it

unavailable.

If transactions are using the rollback segment, the

status is temporarily changed to PENDING OFFLINE ALTER ROLLBACK SEGMENT rbs01

OFFLINE;

Trang 12

Dropping Rollback Segments

A rollback segment must be offline before it can be

dropped.

DROP ROLLBACK SEGMENT rbs01;

Trang 13

Planning Rollback Segments: Number

OLTP

Many small rollback segments

Four transactions per rollback segment

Up to ten transactions per rollback segment

Batch

Few large rollback segments

One per transaction

Trang 14

Planning Rollback Segments:

Number of Extents

0.00 0.10 0.20 0.30 0.40 0.50

Probability

of extending

Trang 15

Rollback Segment Problems

Insufficient space for transactions

Read-consistency errors

Blocking sessions

Errors in taking a tablespace offline

Trang 16

Insufficient Space for Transactions

No space in tablespace:

Extend data files

Enables automatic extension of data files

Add data files

MAXEXTENTS reached for segment

Increase MAXEXTENTS

Re-create segments with larger extent sizes

Trang 17

New image

Table FROM table SELECT *

Read-Consistency Errors

Reused block

Trang 18

Blocking Sessions

Extent 3

Existing extent

3 4

5

Blocking session

Trang 19

Errors in Taking a Tablespace Offline

You cannot take a tablespace offline if it contains an active rollback segment.

1 Determine which rollback segments are in the tablespace.

2 Take all of these rollback segments offline.

3 Find active transactions using these rollback

segments.

4 Find the session ID and serial number.

5 Terminate the session, if necessary.

6 Take the tablespace offline.

Ngày đăng: 29/03/2014, 16:20