您好,登錄后才能下訂單哦!
1.查看數據庫是否開啟歸檔(查看兩個節點rac1和rac2是否開歸檔日志)
SQL> archiveloglist
SP2-0734: unknown command beginning "archivelog..." - rest of line ignored.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Current log sequence 8
SQL>
2.在節點1(rac1)中設置只修改節點1的參數,不影響節點2.
SQL> alter system set cluster_database=false scope=spfile sid='racdb1';
System altered.
SQL>
3.在節點1(rac1)用srvctl命令關閉數據庫
[oracle@rac1 ~]$ srvctl stop database -d racdb
4.掛載數據庫,日志修改為歸檔
SQL> startup mount
SQL> alter database archivelog;
SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
SQL> shutdown immediate
5.啟動數據庫
[oracle@rac1 ~]$ srvctl start database -d racdb
6.檢查修改后的歸檔信息
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 10
Current log sequence 10
SQL>
7.查看數據庫是否啟用閃回功能
節點1(rac1):
SQL> select flashback_on from v$database; --必須先開啟歸檔
FLASHBACK_ON
------------------
NO
SQL>
8.設置閃回的路徑和大小
SQL> alter system set cluster_database=false scope=spfile sid='racdb1';
SQL> alter system set db_recovery_file_dest='+FALSE' scope=spfile;
SQL> alter system set db_recovery_file_dest_size=5G scope=spfile;
9.關閉數據庫
[oracle@rac1 ~]$ srvctl stop database -d racdb
10.啟用閃回
SQL> startup mount
SQL> alter database flashback on;
SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
SQL> shutdown immediate
11.啟動數據庫
[oracle@rac1 ~]$ srvctl start database -d racdb
12.查看閃回功能
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL>
13.也可啟用表空間閃回
SQL> alter tablespace abc flashback on; --開啟表空間閃回
SQL> alter tablespace abc flashback off; --關閉表空間閃回
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。