開啟和關閉Oracle Flashback

來源:互聯網
上載者:User

1、開啟flashback:

關閉資料庫

SQL>shutdown immediate;

啟動到mount方式

SQL>startup mount;

如果歸檔沒有開啟,開啟歸檔[因為flashback依賴Media recovery,所以在開啟flashback之前必須先啟用歸檔]

SQL>alter database archivelog;

開啟閃回

SQL> alter database flashback on;

 

2、關閉flashback:

關閉資料庫:

SQL>shutdown immediate

啟動到mount方式

SQL>startup mount;

關閉閃回

SQL> alter database flashback off;

 

關於Oracle閃回的開啟和關閉,主要就是需要注意以下幾點:

1、閃開開啟的前提是資料庫歸檔必須開啟

2、閃回開啟/關閉和歸檔開啟/關閉一樣,都是在mount模式下

3、如果要在開啟閃回的資料庫上關閉歸檔則必須先關閉依賴于歸檔的閃回功能

查看flashback是否開啟:select name,flashback_on from v$database; 查看閃回恢複區及大小是否設定:show parameter db_recovery; 先設定閃回恢複區的大小:alter system set db_recovery_file_dest_size='2G'; 再設定閃回恢複區路徑:alter system set db_recovery_file_dest='E:\oracle\product\10.2.0\db_recovery_file_dest'; 設定資料庫回退的時間,預設1440分鐘為一天時間:alter system set db_flashback_retention_target = 1440;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.