您好,登錄后才能下訂單哦!
聯機重定義功能是通過物化視圖來實現的。在調用START_REDEF_TABLE存儲過程時,會自動創(chuàng)建與臨時表名稱相同的物化視圖,并將源表的記錄拷貝到臨時表,此時源表可以DML和查詢,不可DDL。
在聯機重定義階段源表產生的DML修改記錄,將會被記錄到物化視圖日志中。在SYNC_INTERIM_TABLE和最后的FINISH_REDEF_TABLE過程,都會根據物化視圖日志中的記錄更新臨時表。
調用ABORT_REDEF_TABLE存儲過程后,建立的物化視圖被清除。如果臨時表上已經有拷貝的數據,那么在ABORT后,臨時表上的數據并未被清除,應手工清除臨時表上的數據。
Table redefinition is started by the DBA creating an interim table based on the original table. The interim table can have a different structure than the original table, and will eventually take the original table's place in the database. While the table is redefined, DML operations on the original table are captured in a Materialized View Log table (MLOG$_%). These changes are eventually transformed and merged into the interim table. When done, the names of the original and the interim tables are swapped in the data dictionary. At this point all users will be working on the new table and the old table can be dropped.
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。