日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

[Flashback]开启数据库闪回数据库功能

發(fā)布時間:2024/8/26 79 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [Flashback]开启数据库闪回数据库功能 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

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 ------------------ NO

3.修改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)行修改

SQL> show parameter db_recoveryNAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /u01/oracle/fast_recovery_area db_recovery_file_dest_size big integer 4182M

2)查看db_flashback_retention_target保留時間

SQL> show parameter db_flashbackNAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_flashback_retention_target integer 1440

4.啟動數(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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。