Oracle表的線上重定義(一)

路途中的人2012發表於2016-09-06
好處:
     When a table is redefined online, it is accessible to both queries and DML during much of the redefinition process. 
     在表進行線上重定義的時候,在整個線上重定義的過程中,該表都可以被查詢和進行DML操作。
內部機制:
Typically, the table is locked in the exclusive mode only during a very small window that is independent of the size of the table and complexity of the redefinition, and that is completely transparent to users.
However, if there are many concurrent DML operations during redefinition, then a longer wait might be necessary before the table can be locked. Due to the wait, more changes are committed to the original table, which increases the refresh time and the amount of time that the table is locked.
     一般來說,在整個過程中,目標表會有一個短暫的時間視窗,在該視窗內該表會上一個exclusive鎖,具體時長取決於表的資料量以及重定義的複雜程度,同時該過程對使用者完全透明。
使用前提:
Online table redefinition requires an amount of free space that is approximately equivalent to the space used by the table being redefined. More space may be required if new columns are added.
     表的線上重定義要求與表資料量同樣大小的空閒空間。如果要新增新列,還需要更多的空間。
具體方法:
You can perform online table redefinition with the Enterprise Manager Reorganize Objects wizard or with the DBMS_REDEFINITION package.
     主要有兩種方法進行線上重定義,一是藉助oem,二是採用DBMS_REDEFINITION包。

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

相關文章