久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

怎么解決數據庫執行alter database open resetlogs時提示ORA

152次閱讀
沒有評論

共計 2500 個字符,預計需要花費 7 分鐘才能閱讀完成。

行業資訊    
數據庫    
關系型數據庫    
怎么解決數據庫執行 alter database open resetlogs 時提示 ORA-00392 錯誤

這篇文章主要介紹“怎么解決數據庫執行 alter database open resetlogs 時提示 ORA-00392 錯誤”,在日常操作中,相信很多人在怎么解決數據庫執行 alter database open resetlogs 時提示 ORA-00392 錯誤問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”怎么解決數據庫執行 alter database open resetlogs 時提示 ORA-00392 錯誤”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學習吧!

問題現象:打開數據庫,提示錯誤

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

問題描述

[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;

到此,關于“怎么解決數據庫執行 alter database open resetlogs 時提示 ORA-00392 錯誤”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注丸趣 TV 網站,丸趣 TV 小編會繼續努力為大家帶來更多實用的文章!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-24發表,共計2500字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 历史| 鲁甸县| 清镇市| 平潭县| 梅河口市| 堆龙德庆县| 简阳市| 大埔区| 昆山市| 迁西县| 威宁| 峨眉山市| 通化市| 禄劝| 宁远县| 安达市| 阆中市| 霍山县| 凯里市| 阿瓦提县| 涡阳县| 东兴市| 波密县| 芜湖县| 宁明县| 凉城县| 嘉祥县| 民权县| 梁河县| 中西区| 延津县| 信阳市| 五河县| 松阳县| 苍南县| 黔东| 师宗县| 桐乡市| 涿州市| 青海省| 常德市|