溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

oracle閃回查詢和閃回數(shù)據(jù)庫

發(fā)布時間:2020-06-23 10:46:31 來源:網(wǎng)絡(luò) 閱讀:465 作者:xiaocao13140 欄目:數(shù)據(jù)庫

oracle閃回查詢和閃回數(shù)據(jù)庫

區(qū)別:

數(shù)據(jù)閃回查詢,只需要啟用撤銷表空間自動管理回滾信息。

使用閃回刪除技術(shù)和閃回數(shù)據(jù)庫技術(shù),需要啟動回收站,閃回恢復(fù)區(qū)。(歸檔模式使用)

 

具體設(shè)置:

---cmd sqlplus nolog sys as sysdba hanatech

具體設(shè)置----數(shù)據(jù)閃回查詢的設(shè)置:

查看撤銷表信息undo:

show parameter undo;

 

設(shè)置撤銷表信息:

alter system set undo_managerment=auto;設(shè)置為auto才可以使用閃回查詢

alter system set undo_retention=900;最長保留時間(單位秒)

alter system set undo_tablespace=undotbs1;

 

查看歸檔模式

archive log list;

 

查看閃回區(qū)文檔位置(默認(rèn)的已經(jīng)設(shè)置了閃回回復(fù)區(qū))

show parameter db_recovery_file

 

設(shè)置歸檔模式(可能歸檔模式默認(rèn)就啟動了undo,可以省略上面的設(shè)置undo)

alter system archive log start;

 

基于as of timestamp的閃回查詢

select * from t_car_carstate as of timestamp to_timestamp('2012-5-29 18:30:00','YYYY-MM-DD HH24:MI:SS')

-----------------------------------------------------------------

------------------------------------------------------------------

具體設(shè)置----閃回數(shù)據(jù)庫技術(shù)設(shè)置:

查看歸檔模式 archive log list;

 

設(shè)置歸檔模式:

shutdown immediate;

startup mount;

alter database archivelog;

alter database open;

alter system archive log start;

archive log list;

 

查看閃回區(qū)文檔位置(默認(rèn)的已經(jīng)設(shè)置了閃回回復(fù)區(qū))

show parameter db_recovery_file

 

啟動數(shù)據(jù)庫flashback特性

shutdown immediate;

startup mount;

alter database flashback on;

alter database on;

alter system set db_flashback_retention_target=2880;設(shè)置歸檔時間:(默認(rèn)的是一天1440分鐘)


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI