[Flashback]开启数据库闪回数据库功能
Flashback是Oracle中一個重要的功能,想要使用閃回數(shù)據(jù)庫功能,需要將數(shù)據(jù)庫置于閃回數(shù)據(jù)庫的狀態(tài)。
1.檢查數(shù)據(jù)庫是否開啟歸檔狀態(tài)
SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 25 Next log sequence to archive 27 Current log sequence 27如果數(shù)據(jù)庫為開啟歸檔模式
--關(guān)閉數(shù)據(jù)庫 SQL> shutdown immediate --打開數(shù)據(jù)庫都mount階段 SQL> startup mount --開啟歸檔模式 SQL> alter database archivelog; --打開數(shù)據(jù)庫 SQL> alter database open;2.檢查數(shù)據(jù)庫是否啟用數(shù)據(jù)庫閃回功能
SQL> select flashback_on from v$database;FLASHBACK_ON ------------------ NO3.修改db_recovery_file_dest、db_recovery_file_dest_size及db_flashback_retention_target三個參數(shù)內(nèi)容
1)db_recovery_file_dest、db_recovery_file_dest_size兩個參數(shù)用于指定閃回日志存放位置及最大大小。可以根據(jù)具體環(huán)境做相應(yīng)調(diào)整使用alter system set語句進(jìn)行修改
2)查看db_flashback_retention_target保留時間
SQL> show parameter db_flashbackNAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_flashback_retention_target integer 14404.啟動數(shù)據(jù)庫到mount階段
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.SQL> startup mount; ORACLE instance started. Total System Global Area 784998400 bytes Fixed Size 2257352 bytes Variable Size 478154296 bytes Database Buffers 301989888 bytes Redo Buffers 2596864 bytes Database mounted.5.啟用flashback功能,并打開數(shù)據(jù)庫
--啟用flashback功能 SQL> alter database flashback on;Database altered. --打開數(shù)據(jù)庫 SQL> alter database open;Database altered.6.驗證閃回功能是否已開啟
SQL> select flashback_on from v$database;FLASHBACK_ON ------------------ YES?
來自:https://blog.csdn.net/u011364306/article/details/49249187
?
轉(zhuǎn)載于:https://www.cnblogs.com/luck666/p/10469802.html
總結(jié)
以上是生活随笔為你收集整理的[Flashback]开启数据库闪回数据库功能的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 7-1查找整数
- 下一篇: Robot Framework操作mon