新聞中心
小編給大家分享一下sql中retention guarantee使用場景和作用有哪些,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
SQL>alter tablespace undo_samll retention guarantee; 表空間已更改。
SQL> select tablespace_name,block_size,extent_management segment_space_management,contents,retention from dba_tablespaces;
需要注意的是這種guarantee模式只針對undo tablespace別的表空間是不適用的。
在Oracle 10g中我們還可以設置undo_retention=0來讓Oracle自動調(diào)整保留提交后undo信息的時間。
10g 中RETENTION GUARANTEE 的作用
1、先解釋下undo_retention
設置undo_retention,保證commit 后的數(shù)據(jù)在undo segment中保留多長時間。但是并不能保證commit后的undo 信息在undo_retention的時間內(nèi)一定不被覆寫,當undo segment不夠時,還是會覆蓋已commit的undo 信息。
2、如果需要保證在undo_retention時間內(nèi)undo 信息一定不被覆寫的話,可以對undo segment設置RETENTION GUARANTEE。但是這個參數(shù)受到undo_retention和undo size的限制。如果undo size 太小,undo_retention設置太久,設置retention guarantee 時就會報錯:
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
3、設置該參數(shù)
alter tablespace undotbs2 retention guarantee;
撤銷該參數(shù)
alter tablespace undotbs2 retention noguarantee;
看完了這篇文章,相信你對“sql中retention guarantee使用場景和作用有哪些”有了一定的了解,如果想了解更多相關知識,歡迎關注創(chuàng)新互聯(lián)-成都網(wǎng)站建設公司行業(yè)資訊頻道,感謝各位的閱讀!
分享題目:sql中retentionguarantee使用場景和作用有哪些-創(chuàng)新互聯(lián)
當前網(wǎng)址:http://fisionsoft.com.cn/article/dosdpo.html