archiveloglistSP2-0734: unknown command beginning archivelog... - rest of line ig..."/>
您好,登錄后才能下訂單哦!
1.查看數(shù)據(jù)庫(kù)是否開啟歸檔(查看兩個(gè)節(jié)點(diǎn)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.在節(jié)點(diǎn)1(rac1)中設(shè)置只修改節(jié)點(diǎn)1的參數(shù),不影響節(jié)點(diǎn)2.
SQL> alter system set cluster_database=false scope=spfile sid='racdb1';
System altered.
SQL>
3.在節(jié)點(diǎn)1(rac1)用srvctl命令關(guān)閉數(shù)據(jù)庫(kù)
[oracle@rac1 ~]$ srvctl stop database -d racdb
4.掛載數(shù)據(jù)庫(kù),日志修改為歸檔
SQL> startup mount
SQL> alter database archivelog;
SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
SQL> shutdown immediate
5.啟動(dòng)數(shù)據(jù)庫(kù)
[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.查看數(shù)據(jù)庫(kù)是否啟用閃回功能
節(jié)點(diǎn)1(rac1):
SQL> select flashback_on from v$database; --必須先開啟歸檔
FLASHBACK_ON
------------------
NO
SQL>
8.設(shè)置閃回的路徑和大小
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.關(guān)閉數(shù)據(jù)庫(kù)
[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.啟動(dòng)數(shù)據(jù)庫(kù)
[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; --關(guān)閉表空間閃回
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。