聯(lián)機(jī)重定義功能是通過物化視圖來實(shí)現(xiàn)的。在調(diào)用START_REDEF_TABLE存儲(chǔ)過程時(shí),會(huì)自動(dòng)創(chuàng)建與臨時(shí)表名稱相同的物化視圖,并將源表的記錄拷貝到臨時(shí)表,此時(shí)源表可以DML和查詢,不可DDL。
在聯(lián)機(jī)重定義階段源表產(chǎn)生的DML修改記錄,將會(huì)被記錄到物化視圖日志中。在SYNC_INTERIM_TABLE和最后的FINISH_REDEF_TABLE過程,都會(huì)根據(jù)物化視圖日志中的記錄更新臨時(shí)表。
調(diào)用ABORT_REDEF_TABLE存儲(chǔ)過程后,建立的物化視圖被清除。如果臨時(shí)表上已經(jīng)有拷貝的數(shù)據(jù),那么在ABORT后,臨時(shí)表上的數(shù)據(jù)并未被清除,應(yīng)手工清除臨時(shí)表上的數(shù)據(jù)。
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.
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
本文名稱:oracle_onlinetableredefinition_2-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://aaarwkj.com/article40/doppeo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、企業(yè)建站、網(wǎng)站營銷、網(wǎng)頁設(shè)計(jì)公司、定制網(wǎng)站、App設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容