ORA-00392: log 15 of thread 1 is being cleared, operation not allowed

東北胖子發表於2016-03-12

今天在做recover database後使用alter database open resetlogs開啟資料庫遇到錯誤

描述一下之前的操作步驟

1,還原資料檔案
run{
set newname for datafile 1 to ‘+DATA’;
..
restore database;
switch datafile all;
}

2,恢復資料庫
recover database

修改redo日誌的路徑到ASM
alter database rename file '/sgpmdb/oradata/u01/cmsdb/log13a.log' to '+REDO';
alter database rename file '/sgpmdb/oradata/u01/cmsdb/log13b.log' to '+REDO';
alter database rename file '/sgpmdb/oradata/u01/cmsdb/log14.log' to '+REDO';
..
alter database rename file '/sgpmdb/oradata/u01/cmsdb/log24b.log' to '+REDO’;


3,開啟資料庫庫報錯
alter database open resetlogs;

ORA-00392: log 15 of thread 1 is being cleared, operation not allowed


分析:log 15和log 19分別是生產庫節點一和節點二的當前日誌組,在災備端resetlogs命令後要重新建立redo,但是15、19被記錄為當前狀態current不允許被清除。其實解決方法很簡單,就是採取手工清除。

解決方案:

1,手工清除current組日誌

alter database clear logfile group 15;
alter database clear logfile group 19;

2,開啟資料庫成功

alter database open resetlogs;

下面是掃尾工作,針對此次專案
3,禁用thread 2(源端為RAC,目標為單例項)

alter database disable thread 2;

4,刪除thread 2的日誌組
alter database drop logfile group 19;
..
alter database drop logfile group 24;



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/2317695/viewspace-2056298/,如需轉載,請註明出處,否則將追究法律責任。

相關文章