新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle10g數(shù)據(jù)庫閃回的配置與使用詳解
之前我們?cè)榻B過:關(guān)于Oracle數(shù)據(jù)庫閃回個(gè)性的詳細(xì)介紹,本文我們將Oracle 10g 數(shù)據(jù)庫閃回的配置與使用總結(jié)出來,供讀者學(xué)習(xí)參考,讀者無需理解,直接套用即可完成配置。

執(zhí)行以下的SQL語句:
- sqlplus sys/passwd@tns_name as sysdba
- sql>shutdown immediate ;//關(guān)閉數(shù)據(jù)庫
- sql>startup mount;//啟動(dòng)數(shù)據(jù)庫控制文件,讓實(shí)例與數(shù)據(jù)庫關(guān)連,還有兩種unmount啟動(dòng)數(shù)據(jù)庫實(shí)例,open控制文件找到并打開數(shù)據(jù)文件與日志文件,啟動(dòng)數(shù)據(jù)庫
- sql>alter database archivelog;//啟動(dòng)歸檔
- sql>alter datbase flashback on;
- sql>select flashback_on from v$database;//查看啟動(dòng)結(jié)果,如果flashback_on的值為on,說明啟動(dòng)成功
- sql>show parameter recyclebin;//如果要使用表的閃回,recyclebin(回收站)就得打開
這樣Oracle 10g數(shù)據(jù)庫的閃回就配置好了。
如果要使用數(shù)據(jù)庫閃回,則需要執(zhí)行以下的代碼:
- sqlplus sys/passwd@tns_name as sysdba
- sql>shutdown immediate ;//關(guān)閉數(shù)據(jù)庫
- sql>startup mount;//啟動(dòng)數(shù)據(jù)庫控制文件,讓實(shí)例與數(shù)據(jù)庫關(guān)連,還有兩種unmount啟動(dòng)數(shù)據(jù)庫實(shí)例,open控制文件找到并打開數(shù)據(jù)文件與日志文件,啟動(dòng)數(shù)據(jù)庫
- sql>flashback database to timestamp to_timestamp('2011-08-08 09-14-01','yyyy-mm-dd hh24:mi:ss'');//閃回?cái)?shù)據(jù)庫
- sql>alter database open resetlogs;//必須在open后面加入resetlogs或者noresetlogs不然會(huì)報(bào)出ora-01589錯(cuò)誤
如果要閃回表,代碼如下:
- flashback table table_name to timestamp to_timestamp('2011-08-08 09-14-01','yyyy-mm-dd hh24:mi:ss'');
表刪除以后的閃回:
- flashback table table_name to before drop;
如果這時(shí)出現(xiàn)ora-38305錯(cuò)誤。就先執(zhí)行:
- alter table table_name enable row movement;
關(guān)于Oracle 10g 數(shù)據(jù)庫閃回的配置與使用的知識(shí)就介紹到這里了,如果您想了解更多的關(guān)于Oracle數(shù)據(jù)庫的知識(shí),可以看一下這里的文章:http://database./oracle/,相信一定可以給您帶來收獲的!
【編輯推薦】
- SQL Server數(shù)據(jù)庫日志已滿的解決方法總結(jié)篇
- 使用connectionStrings連接SQL Server數(shù)據(jù)庫
- SQL Server分頁存儲(chǔ)過程的五種方法及性能比較
- MySQL數(shù)據(jù)庫主從服務(wù)器文檔的部署與切換詳解
- 操作系統(tǒng)不支持SQL Server服務(wù)器組件的解決方案
文章題目:Oracle10g數(shù)據(jù)庫閃回的配置與使用詳解
標(biāo)題URL:http://fisionsoft.com.cn/article/cocpeds.html


咨詢
建站咨詢
