首页 > 数据库 >Oracle DataGuard异常处理【ORA-01119 ORA-17502 ORA-15041】→【ORA-01111 ORA-01110 ORA-01157】

Oracle DataGuard异常处理【ORA-01119 ORA-17502 ORA-15041】→【ORA-01111 ORA-01110 ORA-01157】

时间:2024-06-19 13:27:43浏览次数:26  
标签:01110 01111 file CLOSING disk type channel ORA

收到用户反馈DG上查不到最近一天的数据,怀疑同步有问题

一、检查备库同步情况 两个节点都未看到MRP0进程


SQL> select process,status,thread#,sequence# from v$managed_standby;

PROCESS 	   STATUS		       THREAD#	SEQUENCE#
------------------ ------------------------ ---------- ----------
ARCH		   CLOSING			     6	   174201
DGRD		   ALLOCATED			 0		0
DGRD		   ALLOCATED			 0		0
ARCH		   CLOSING			     5	   284619
ARCH		   CLOSING			     5	   280446
ARCH		   CLOSING			     6	   152822
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     6		0

二、查看alert日志发现如下报错 备库ASM 空间满

2023-02-28T16:47:29.089825+08:00
Errors in file /opt/oracle/diag/rdbms/node/NODE1/trace/NODE1_pr00_169293.trc:
ORA-01119: error in creating database file '+DATADG'
ORA-17502: ksfdcre:4 Failed to create file +DATADG
ORA-15041: diskgroup "DATADG" space exhausted
File #1071 added to control file as 'UNNAMED01071'.
Originally created as:
'+DATADG/NODE/DATAFILE/flxeaptbs2.3305.1129999631'
Recovery was unable to create the file as a new OMF file.
PR00 (PID:169293): MRP0: Background Media Recovery terminated with error 1274
2023-02-28T16:47:29.121223+08:00
Errors in file /opt/oracle/diag/rdbms/node/NODE1/trace/NODE1_pr00_169293.trc:
ORA-01274: cannot add data file that was originally created as '+DATADG/NODE/DATAFILE/flxeaptbs2.3305.1129999631'
2023-02-28T16:47:29.123758+08:00
.... (PID:9453): Managed Standby Recovery not using Real Time Apply

三、处理空间问题

查看发现过期备份未删除 已经累计29T了…

grid@NODE1:/home/grid>$ ./asmdu.sh +DATADG/NODE

		    +DATADG/NODE subdirectories size

                   Subdir         Used MB       Mirror MB
                   ------         -------       ---------
               BACKUPSET/        30461584        60923168
             CONTROLFILE/             520            1560
                DATAFILE/         1549554         3099108
               ONLINELOG/           86856          173712
           PARAMETERFILE/               4               8
                PASSWORD/               0               0
                TEMPFILE/          646354         1292708


                   ------         -------       ---------
                    Total        32744872        6549026
利用原本的删除脚本删除报错
sh clean.sh
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 03/01/2023 14:02:41
RMAN-06091: no channel allocated for maintenance (of an appropriate type)

这也找到为什么会把空间撑爆的原因了…这个DB我们接手不久,都是前任DBA留的坑啊…

修改删除策略

run{
allocate channel c1 device type disk ;
allocate channel c2 device type disk ;
allocate channel c3 device type disk ;
allocate channel c4 device type disk ;
allocate channel c5 device type disk ;
allocate channel c6 device type disk ;
allocate channel c7 device type disk ;
allocate channel c8 device type disk ;
allocate channel c9 device type disk ;
allocate channel c10 device type disk ;
allocate channel for maintenance type disk;
crosscheck backup;
crosscheck archivelog all;
delete noprompt obsolete device type disk;
delete noprompt archivelog until time 'sysdate-7' device type disk;
delete noprompt expired backup;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
release channel c7;
release channel c8;
release channel c9;
release channel c10;
}

再次执行脚本
sh.clean.sh
''''''
backup piece handle=+REDODG/NODE/AUTOBACKUP/2023_02_20/s_1129314781.5314.1129314783 RECID=47584 STAMP=1129314782
Deleted 4442 objects
''''''

删除成功

空间清理完成

grid@NODE1:/home/grid>$ ./asmdu.sh +DATADG/NODE

		    +DATADG/NODE subdirectories size

                   Subdir         Used MB       Mirror MB
                   ------         -------       ---------
               BACKUPSET/          701954         1403908
             CONTROLFILE/             520            1560
                DATAFILE/         1549554         3099108
               ONLINELOG/           86856          173712
           PARAMETERFILE/               4               8
                PASSWORD/               0               0
                TEMPFILE/          646354         1292708

                   ------         -------       ---------
                    Total         2985242         5971004

删除后仅剩不到700M…释放出29T空间

四、尝试重新开启MRP0进程

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Database altered.
执行成功 再次检查
SQL> select process,status,thread#,sequence# from v$managed_standby;

PROCESS 	   STATUS		       THREAD#	SEQUENCE#
------------------ ------------------------ ---------- ----------
ARCH		   CLOSING			     6	   174201
DGRD		   ALLOCATED			 0		0
DGRD		   ALLOCATED			 0		0
ARCH		   CLOSING			     5	   284619
ARCH		   CLOSING			     5	   280446
ARCH		   CLOSING			     6	   152822
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     6		0
发现MRP0进程仍然没有启动 
再次查看alert日志发现如下报错
Errors in file /opt/oracle/diag/rdbms/node/NODE1/trace/NODE1_mrp0_138218.trc:
ORA-01111: name for data file 1071 is unknown - rename to correct file
ORA-01110: data file 1071: '/opt/oracle/products/19.3.0/dbs/UNNAMED01071'
ORA-01157: cannot identify/lock data file 1071 - see DBWR trace file
ORA-01111: name for data file 1071 is unknown - rename to correct file
ORA-01110: data file 1071: '/opt/oracle/products/19.3.0/dbs/UNNAMED01071'
2023-03-01T14:29:23.252555+08:00
Background Media Recovery process shutdown (NODE1)

原因 : 备库ASM空间不足时如主库新增数据文件 备库会把数据文件传入到dbs目录下

五、解决方案

这个问题MOS上有标准解决步骤,我们正常按照步骤处理就行

How to resolve ORA-01111 ORA-01110 ORA-01157 in a physical standby database (Doc ID 1416554.1)

在这里插入图片描述
在这里插入图片描述

执行方案
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL SID='*';

Database altered.

SQL> show parameter db_create_file_dest

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
db_create_file_dest                  string                 +DATADG
-- 当前环境已经配置了OMF
SQL> alter database create datafile '/opt/oracle/products/19.3.0/dbs/UNNAMED01071' as '+DATADG' size 31G;

Database altered.

SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO SID='*';

Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Database altered.


再次检查MRP0进程
SQL> select process,status,thread#,sequence# from v$managed_standby;

PROCESS 	   STATUS		       THREAD#	SEQUENCE#
------------------ ------------------------ ---------- ----------
ARCH		   CLOSING			     6	   174201
DGRD		   ALLOCATED			 0		0
DGRD		   ALLOCATED			 0		0
ARCH		   CLOSING			     5	   284619
ARCH		   CLOSING			     5	   280446
ARCH		   CLOSING			     6	   152822
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     0		0
RFS			   IDLE 			     6		0
MRP0		   APPLYING_LOG 		 6	   174558

备库已恢复正常同步,日志已应用

标签:01110,01111,file,CLOSING,disk,type,channel,ORA
From: https://blog.csdn.net/qq_45338311/article/details/139737076

相关文章

  • Sora不香了,Runway Gen-3震撼发布!AI电影时代真的要来了!(附与快手可灵对比测试)
    文章首发于公众号:X小鹿AI副业大家好,我是程序员X小鹿,前互联网大厂程序员,自由职业2年+,也一名AIGC爱好者,持续分享更多前沿的「AI工具」和「AI副业玩法」,欢迎一起交流~AI视频太卷了!刚上线的快手可灵(Kling)、LumaAI的DreamMachine的热乎劲还没过,Runway又发布重磅消......
  • Oracle数据库修复利器:DBMS_REPAIR包详解与实战
    在Oracle数据库中,数据文件的完整性和稳定性对于系统的正常运行至关重要。然而,由于各种原因(如硬件故障、软件错误等),数据文件有时会出现损坏,导致数据丢失或系统崩溃。为了应对这种情况,Oracle提供了DBMS_REPAIR包,这是一个强大的工具,可以帮助我们发现、标识并修复数据文件中的坏块。......
  • Typora高级用法
    闲来无事,原本想给typora做一个ai接口的,但是突然发现,下载的人好像都特别喜欢搞创新和升级,现在的typora真的说真的升级的越来越牛了看我界面,一种高级感嘿哈是不是很牛的,所以写一篇文章来记录一下。下载插件的网址https://codeload.github.com/obgnail/typora_plugin/zip/refs......
  • Oracle 12C的闪回技术详解
    1闪回技术介绍闪回技术是oracle强大数据库备份恢复机制的一部分,在数据库发生逻辑错误的时候,闪回技术能提供快速且最小损失的恢复(多数闪回功能都能在数据库联机状态下完成)。需要注意的是,闪回技术旨在快速恢复逻辑错误,对于物理损坏或是介质丢失的错误,闪回技术就回天乏术了,还......
  • Lora 和peft
    PEFT(Parameter-EfficientFine-Tuning参数高效微调)huggingface:PEFT(huggingface.co)github:GitHub-huggingface/peft:......
  • Typora 1.0.3 markdown 满屏显示,去除两边的留白
    Typora宽度在CSS样式文件中有个max-width值,现在的显示器分辨率比较高,会导致编辑器两边留白比较多导致文档编辑时,高分辨率的显示器,得不到充分利用解决方案查看不要直接去安装目录下修改,实际目录可能会不一样......
  • oracle并发与多版本控制
    1相关概念1.1并发控制数据库对多个用户同时查询或者操作数据的管理。1.2多版本控制oracle能物化多个版本的数据,使在一个时间点读一个表,保证在这个时间点读到的表数据是一致的。oracle的多版本控制机制是oracle提供读一致性的基础。1.3事务的作用事务使数据库从一种一致......
  • LLM微调方法(Efficient-Tuning)六大主流方法:思路讲解&优缺点对比[P-tuning、Lora、Pre
    LLM微调方法(Efficient-Tuning)六大主流方法:思路讲解&优缺点对比[P-tuning、Lora、Prefixtuing等]由于LLM参数量都是在亿级以上,少则数十亿,多则数千亿。当我们想在用特定领域的数据微调模型时,如果想要full-tuning所有模型参数,看着是不太实际,一来需要相当多的硬件设备(GPU),二来需要......
  • [Tkey] A decorative fence
    还是看看简单而富有美感的爆搜吧#include<bits/stdc++.h>usingnamespacestd;#defineintlonglong#definetestsintcases;cin>>cases;while(cases--)intn,l;vector<int>e;boolvis[21];intcnt=0;voiddfs(intp){ if(cnt==l)return; if(p>n){ cnt++......
  • Win11系统提示找不到coloradapterclient.dll文件的解决办法
    其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个coloradapterclient.dll文件(挑选合适的版本......