您好,登錄后才能下訂單哦!
這篇文章主要介紹“怎么解決數(shù)據(jù)庫(kù)執(zhí)行alter database open resetlogs時(shí)提示ORA-00392錯(cuò)誤”,在日常操作中,相信很多人在怎么解決數(shù)據(jù)庫(kù)執(zhí)行alter database open resetlogs時(shí)提示ORA-00392錯(cuò)誤問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”怎么解決數(shù)據(jù)庫(kù)執(zhí)行alter database open resetlogs時(shí)提示ORA-00392錯(cuò)誤”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
問(wèn)題現(xiàn)象:打開(kāi)數(shù)據(jù)庫(kù),提示錯(cuò)誤
RMAN> alter database open resetlogs; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of alter db command at 12/17/2018 11:22:26 ORA-00392: log 2 of thread 1 is being cleared, operation not allowed ORA-00312: online log 2 thread 1: '/u02/app/oracle/oradata/cams/redo02.log'
問(wèn)題描述
[oracle@SIT130093 ~]$ oerr ORA 00392 00392, 00000, "log %s of thread %s is being cleared, operation not allowed" // *Cause: An operation encountered this online log in the middle of being // cleared. The command that began the clearing may have terminated // without completing the clearing. // *Action: If the clear command is still executing then wait for its // completion. If it terminated then reissue the clear command, or // drop the log.
解決方案
SYS@cams>select GROUP#,STATUS from v$log; GROUP# STATUS ---------- ---------------- 1 CLEARING 3 CLEARING 2 CLEARING_CURRENT SYS@cams>alter database clear logfile group 1; Database altered. SYS@cams>alter database clear logfile group 2; Database altered. SYS@cams>alter database clear logfile group 3; Database altered. SYS@cams>select GROUP#,STATUS from v$log; GROUP# STATUS ---------- ---------------- 1 UNUSED 3 UNUSED 2 CURRENT
RMAN> alter database open resetlogs; database opened
如果使用clear logfile的方案不好使,可采用如下方案:
Recreate the controflile with the RESETLOGS option. 1) Get the controlfile trace from below command : SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/tmp/control.sql' resetlogs ; 2) Modify the CREATE CONTROLFILE script /tmp/control.sql and ensure that all directories for the online redo logs exist and Oracle has permission to write to it 3) Create the controlfile in NOMOUNT state : SQL> STARTUP FORCE NOMOUNT SQL> @/tmp/control.sql controlfile created 4) Run a fake recovery : SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL ; Type <CANCEL> when prompted 5) Open with RESETLOGS option: SQL> ALTER DATABASE OPEN RESETLOGS;
到此,關(guān)于“怎么解決數(shù)據(jù)庫(kù)執(zhí)行alter database open resetlogs時(shí)提示ORA-00392錯(cuò)誤”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注億速云網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!
免責(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)容。