小編給大家分享一下sql中retention guarantee使用場(chǎng)景和作用有哪些,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

SQL>alter tablespace undo_samll retention guarantee; 表空間已更改。
SQL> select tablespace_name,block_size,extent_management segment_space_management,contents,retention from dba_tablespaces;
需要注意的是這種guarantee模式只針對(duì)undo tablespace別的表空間是不適用的。
在Oracle 10g中我們還可以設(shè)置undo_retention=0來(lái)讓Oracle自動(dòng)調(diào)整保留提交后undo信息的時(shí)間。
10g 中RETENTION GUARANTEE 的作用
1、先解釋下undo_retention
設(shè)置undo_retention,保證commit 后的數(shù)據(jù)在undo segment中保留多長(zhǎng)時(shí)間。但是并不能保證commit后的undo 信息在undo_retention的時(shí)間內(nèi)一定不被覆寫,當(dāng)undo segment不夠時(shí),還是會(huì)覆蓋已commit的undo 信息。
2、如果需要保證在undo_retention時(shí)間內(nèi)undo 信息一定不被覆寫的話,可以對(duì)undo segment設(shè)置RETENTION GUARANTEE。但是這個(gè)參數(shù)受到undo_retention和undo size的限制。如果undo size 太小,undo_retention設(shè)置太久,設(shè)置retention guarantee 時(shí)就會(huì)報(bào)錯(cuò):
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
3、設(shè)置該參數(shù)
alter tablespace undotbs2 retention guarantee;
撤銷該參數(shù)
alter tablespace undotbs2 retention noguarantee;
看完了這篇文章,相信你對(duì)“sql中retention guarantee使用場(chǎng)景和作用有哪些”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道,感謝各位的閱讀!
網(wǎng)站欄目:sql中retentionguarantee使用場(chǎng)景和作用有哪些-創(chuàng)新互聯(lián)
標(biāo)題URL:http://www.chinadenli.net/article30/dosdpo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、面包屑導(dǎo)航、網(wǎng)站建設(shè)、網(wǎng)站導(dǎo)航、微信公眾號(hào)、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容