歸檔 1.設(shè)置歸檔路徑 SYS@rac1> alter system set log_archive_dest_1= LOCATION=+fra scope=both s..."/>
溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

11g RAC 歸檔與非歸檔的切換

發(fā)布時(shí)間:2020-08-08 14:38:36 來源:ITPUB博客 閱讀:155 作者:波仔strong 欄目:關(guān)系型數(shù)據(jù)庫
11g RAC 歸檔與非歸檔的切換

非歸檔------->歸檔
1.設(shè)置歸檔路徑
SYS@rac1> alter system set log_archive_dest_1='LOCATION=+fra' scope=both sid='rac1';
SYS@rac2> alter system set log_archive_dest_1='LOCATION=+fra' scope=both sid='rac2';

2.關(guān)閉所有實(shí)例
shutdown immediate

3.設(shè)置歸檔
SYS@rac1> startup mount
SYS@rac1> alter database archivelog;

4.打開數(shù)據(jù)庫
SYS@rac1> alter database open;

5。兩個節(jié)點(diǎn)驗(yàn)證
節(jié)點(diǎn)1
SYS@rac1> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA
Oldest online log sequence 25
Next log sequence to archive 26
Current log sequence 26

節(jié)點(diǎn)2
SYS@rac2> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA
Oldest online log sequence 29
Next log sequence to archive 30
Current log sequence 30

6.查看歸檔文件
ASMCMD [+FRA/rac/archivelog/2018_03_23] > ls
thread_1_seq_26.263.971545091
thread_2_seq_29.261.971544421
thread_2_seq_30.262.971545055

歸檔------->非歸檔
1關(guān)閉數(shù)據(jù)庫
[oracle@rac1 ~]$ srvctl stop database -d rac

2.其中一個節(jié)點(diǎn)操作
SYS@rac1> startup mount;
SYS@rac1> alter database noarchivelog;
SYS@rac1> alter database open;

3.驗(yàn)證
SYS@rac1> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +FRA
Oldest online log sequence 26
Current log sequence 27

SYS@rac2> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +FRA
Oldest online log sequence 31
Current log sequence 32

使用rman 刪除歸檔
[oracle@rac1 ~]$ rman target /
RMAN> delete archivelog all;

ASMCMD [+fra/rac] > ls
CONTROLFILE/
ONLINELOG/
已經(jīng)刪除









向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI