溫馨提示×

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

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

oracle閃回那些事

發(fā)布時(shí)間:2020-08-02 19:31:56 來源:網(wǎng)絡(luò) 閱讀:644 作者:叫你 欄目:關(guān)系型數(shù)據(jù)庫

開啟閃回?cái)?shù)據(jù)庫

alter database flashback on;

alter database open;

修改日期時(shí)間顯示格式:

alter session  set nls_date_format='yyyy-mm-dd hh34:mi:ss';

查看系統(tǒng)視圖 v$flashback_database_log中查看閃回?cái)?shù)據(jù)庫日志信息:

select * from v$flashback_database_log;

閃回?cái)?shù)據(jù)庫:

flashback database to timestamp(to_date('2014-10-11 12:20:11','yyyy-mm-dd hh34:mi:ss'));

閃回恢復(fù)后需要resetlogs 或者noresetlogs 打開:

alter database open resetlogs/noresetlogs;

閃回表:

flashback table tablename to timestamp(to_date('2014-11-10 12:12:12','yyyy-mm-dd hh34:mi:ss'));

閃回回收站:

flashback table tablename to before drop;

刪除回收站中的數(shù)據(jù)可以使用以下命令:;

purge table tablename;

清空回收站:

purge dba_recyclebin;

閃回查詢:

select * from tablename as of timestamp to timestamp(to_date('2014-11-12 10:10:10','yyyy-mm-dd hh34:mi:ss')) where ....;

閃回版本查詢:

select versions_starttime,version_operation,name,score from tablename versions between timestamp minvalue and maxvalue;

閃回事務(wù)查詢:

select table_name,undo_sql from flashback_tracsaction_query where rownum<5;


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

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

AI