undo segment的建立、線上以及extent的分配原則。

warehouse發表於2009-04-19

doc解釋的很清楚,看doc吧

The number of undo segments created and brought online is a function of the SESSIONS parameter. The algorithm is roughly 1 undo segment for each 5 sessions. All undo segments are placed online when the sessions parameter is set to 46 or greater. The lower limit was not tested, as the minimum value for the sessions parameter in the test database was 16, which was derived from the minimum number of processes (10) for the database. These are sized according to the autoallocate algorithm for locally managed tablespaces. The basic algorithm is that the first 16 extents are 64k in size. The subsequent allocation method is the next 63 extents of 1m, the next 120 extents of 8m and all additional extents at 64m.

[@more@]

When the undo tablespace is created, a number of undo segments are created. These are named using the _SYSSMU$ algorithm. Because of the new name, some commands (alter system dump undo header) require that the undo segment name be enclosed in double quotes. The number of undo segments created and brought online is a function of the SESSIONS parameter. The algorithm is roughly 1 undo segment for each 5 sessions. All undo segments are placed online when the sessions parameter is set to 46 or greater. The lower limit was not tested, as the minimum value for the sessions parameter in the test database was 16, which was derived from the minimum number of processes (10) for the database. These are sized according to the autoallocate algorithm for locally managed tablespaces. The basic algorithm is that the first 16 extents are 64k in size. The subsequent allocation method is the next 63 extents of 1m, the next 120 extents of 8m and all additional extents at 64m. The first block of the first undo extent is reserved as the header and not indicated in the data dictionary views. As with Oracle 8, the second block of the undo segment is not used initially and may or may not be allocated at a later time. This is one of those anomalies that has no consistent pattern and is therefore hard to explain.

--=====================================

SQL> connect / as sysdba
已連線。
SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> show parameter process

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 25
SQL> show parameter session

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
java_max_sessionspace_size integer 0
java_soft_sessionspace_limit integer 0
license_max_sessions integer 0
license_sessions_warning integer 0
logmnr_max_persistent_sessions integer 1
session_cached_cursors integer 20
session_max_open_files integer 10
sessions integer 170
shared_server_sessions integer
SQL> select segment_name,segment_id,status from dba_rollback_segs order by statu
s;

SEGMENT_NAME SEGMENT_ID STATUS
------------------------------ ---------- ----------------
_SYSSMU19$ 19 OFFLINE
_SYSSMU18$ 18 OFFLINE
_SYSSMU20$ 20 OFFLINE
RBS2 2 OFFLINE
_SYSSMU12$ 12 ONLINE
_SYSSMU13$ 13 ONLINE
_SYSSMU14$ 14 ONLINE
_SYSSMU15$ 15 ONLINE
_SYSSMU16$ 16 ONLINE
_SYSSMU17$ 17 ONLINE
_SYSSMU11$ 11 ONLINE

SEGMENT_NAME SEGMENT_ID STATUS
------------------------------ ---------- ----------------
_SYSSMU4$ 4 ONLINE
_SYSSMU3$ 3 ONLINE
SYSTEM 0 ONLINE
_SYSSMU1$ 1 ONLINE

已選擇15行。

SQL>

--當processes=25時,例項啟動時自動online了10個undo segment(rbs2是手段管理的,system是系統的都不需要管)還有3個是offline,25個processes對應的sessions是:25×1.1+5=33 33/5=7事實上安裝doc的解釋online 7個其實就夠了...

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1020835/,如需轉載,請註明出處,否則將追究法律責任。

相關文章