200T 数据库非归档无备份恢复---惜分飞

news2024/11/14 17:16:10

一套近200T的,6个节点的RAC,由于存储管线链路不稳定,导致服务器经常性掉盘,引起asm 磁盘组频繁dismount/mount,数据库集群节点不停的重启,修复好链路问题之后,数据库启动报ORA-01113,ORA-01110
 

ORA-01113-ORA-01110


通过Oracle数据库异常恢复检查脚本(Oracle Database Recovery Check)脚本检测,发现有10个数据文件异常,无法正常恢复


该库比较大,有近200T,因此恢复需要各位谨慎(无法做现场备份,另外客户要求2天时间必须恢复好)
 

200t


由于数据库是非归档模式,该库无法通过应用归档日志来实现对这些文件进行恢复,对于这种情况,直接使用dbms_diskgroup把数据文件头拷贝到文件系统中,类似操作

SQL> @dbms_diskgroup_get_block.sql  +DATA/xifenfei.dbf 1 1 /tmp/xff/xifenfei.dbf.header

Parameter 1:

ASM_file_name (required)

Parameter 2:

block_to_extract (required)

Parameter 3

number_of_blocks_to_extract (required)

Parameter 4:

FileSystem_File_Name (required)

old  14:  v_AsmFilename := '&ASM_File_Name';

new  14:  v_AsmFilename := '+DATA/xifenfei.dbf';

old  15:  v_offstart := '&block_to_extract';

new  15:  v_offstart := '1';

old  16:  v_numblks := '&number_of_blocks_to_extract';

new  16:  v_numblks := '1';

old  17:  v_FsFilename := '&FileSystem_File_Name';

new  17:  v_FsFilename := '/tmp/xff/xifenfei.dbf.header';

File: +DATA/xifenfei.dbf

Type: 2 Data File

Size (in logical blocks): 3978880

Logical Block Size: 16384

Physical Block Size: 512

PL/SQL procedure successfully completed.

然后通过bbed修改相关scn

BBED> set filename 'xifenfei.dbf.header'

    FILENAME        xifenfei.dbf.header

BBED> set blocksize 16384

    BLOCKSIZE       16384

BBED> map

 File: xifenfei.dbf.header (0)

 Block: 1                                     Dba:0x00000000

------------------------------------------------------------

 Data File Header

 struct kcvfh, 860 bytes                    @0      

 ub4 tailchk                                @16380  

BBED> p kcvfh.kcvfhckp.kcvcpscn

struct kcvcpscn, 8 bytes                    @484    

   ub4 kscnbas                              @484      0xa8061324

   ub2 kscnwrp                              @488      0x0081

BBED> assign file 295 block 1 kcvfh.kcvfhckp.kcvcpscn = file 1 block 1 kcvfh.kcvfhckp.kcvcpscn;

struct kcvcpscn, 8 bytes                    @484    

   ub4 kscnbas                              @484      0xa8133e2b

   ub2 kscnwrp                              @488      0x0081

然后把修改的数据文件头写回到asm中

SQL> @dbms_diskgroup_cp_block_to_asm.sql  /tmp/xff/xifenfei.dbf.header  +DATA/xifenfei.dbf 1 1

Parameter 1:

v_FsFileName (required)

Parameter 2:

v_AsmFileName (required)

Parameter 3

v_offstart (required)

Parameter 4

v_numblks (required)

old  16: v_FsFileName := '&v_FsFileName';

new  16: v_FsFileName := '/tmp/xff/xifenfei.dbf.header';

old  17: v_AsmFileName := '&v_AsmFileName';

new  17: v_AsmFileName := '+DATA/xifenfei.dbf';

old  18: v_offstart := '&v_offstart';

new  18: v_offstart := '1';

old  19:  v_numblks := '&v_numblks';

new  19:  v_numblks := '1';

File: +DATA/xifenfei.dbf

Type: 2 Data File

Size (in logical blocks): 3978880

Logical Block Size: 16384

PL/SQL procedure successfully completed.

查询文件头是否修改成功

[oracle@xff1 xff]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Aug 10 16:45:02 2024

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL> set numw 16

SQL> select CHECKPOINT_CHANGE# from v$datafile_header where file# in (1,295);

CHECKPOINT_CHANGE#

------------------

      556870614571

      556870614571

SQL> recover datafile 295;

Media recovery complete.

通过上述操作,确认bbed修改文件头成功,后续类似方法对其他9个文件进行修改,并打开数据库

SQL> recover database;

Media recovery complete.

SQL> alter database open;

Database altered.

alert日志提示

Sat Aug 10 16:46:11 2024

ALTER DATABASE RECOVER  datafile 295 

Media Recovery Start

Serial Media Recovery started

WARNING! Recovering data file 295 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

Media Recovery Complete (xff1)

Completed: ALTER DATABASE RECOVER  datafile 295 

Sat Aug 10 16:46:39 2024

ALTER DATABASE RECOVER  database 

Media Recovery Start

 started logmerger process

Sat Aug 10 16:46:51 2024

WARNING! Recovering data file 1139 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 1140 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 1601 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 1803 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 1827 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 1931 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 2185 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 2473 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

WARNING! Recovering data file 2616 from a fuzzy backup. It might be an online

backup taken without entering the begin backup command.

Sat Aug 10 16:46:54 2024

Parallel Media Recovery started with 64 slaves

Media Recovery Complete (xff1)

Completed: ALTER DATABASE RECOVER  database 

Sat Aug 10 17:19:58 2024

alter database open

This instance was first to open

Sat Aug 10 17:19:58 2024

SUCCESS: diskgroup DATA was mounted

Sat Aug 10 17:19:58 2024

NOTE: dependency between database xff and diskgroup resource ora.DATA.dg is established

Sat Aug 10 17:20:10 2024

Picked broadcast on commit scheme to generate SCNs

Sat Aug 10 17:20:10 2024

SUCCESS: diskgroup REDO was mounted

Sat Aug 10 17:20:10 2024

NOTE: dependency between database xff and diskgroup resource ora.REDO.dg is established

Thread 1 opened at log sequence 124958

  Current log# 14 seq# 124958 mem# 0: +REDO/xff/log2.ora

Successful open of redo thread 1

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Sat Aug 10 17:20:14 2024

SMON: enabling cache recovery

Instance recovery: looking for dead threads

Instance recovery: lock domain invalid but no dead threads

[33770] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:261099864 end:261100854 diff:990 (9 seconds)

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

SMON: enabling tx recovery

Database Characterset is ZHS16GBK

Sat Aug 10 17:20:16 2024

minact-scn: Inst 1 is now the master inc#:2 mmon proc-id:33650 status:0x7

minact-scn status: grec-scn:0x0000.00000000 gmin-scn:0x0000.00000000 gcalc-scn:0x0000.00000000

Starting background process GTX0

Sat Aug 10 17:20:16 2024

GTX0 started with pid=45, OS id=34119

Starting background process RCBG

Sat Aug 10 17:20:16 2024

RCBG started with pid=46, OS id=34121

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Sat Aug 10 17:20:16 2024

QMNC started with pid=47, OS id=34134

Starting background process SMCO

Completed: alter database open

其他集群其他节点数据库,一切正常


检查数据字典一致性

SQL> @hcheck.sql

HCheck Version 07MAY18 on 10-AUG-2024 18:24:49

----------------------------------------------

Catalog Version 11.2.0.3.0 (1102000300)

db_name: XFF

                   Catalog   Fixed

Procedure Name             Version    Vs Release    Timestamp

Result

------------------------------ ... ---------- -- ---------- --------------

------

.- LobNotInObj             ... 1102000300 <=  *All Rel* 08/10 18:24:49 PASS

.- MissingOIDOnObjCol          ... 1102000300 <=  *All Rel* 08/10 18:24:49 PASS

.- SourceNotInObj          ... 1102000300 <=  *All Rel* 08/10 18:24:49 PASS

.- OversizedFiles          ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- PoorDefaultStorage          ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- PoorStorage             ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- TabPartCountMismatch        ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- OrphanedTabComPart          ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- MissingSum$             ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- MissingDir$             ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- DuplicateDataobj        ... 1102000300 <=  *All Rel* 08/10 18:24:50 PASS

.- ObjSynMissing           ... 1102000300 <=  *All Rel* 08/10 18:24:51 PASS

.- ObjSeqMissing           ... 1102000300 <=  *All Rel* 08/10 18:24:51 PASS

.- OrphanedUndo            ... 1102000300 <=  *All Rel* 08/10 18:24:51 PASS

.- OrphanedIndex           ... 1102000300 <=  *All Rel* 08/10 18:24:51 PASS

.- OrphanedIndexPartition      ... 1102000300 <=  *All Rel* 08/10 18:24:51 PASS

.- OrphanedIndexSubPartition   ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- OrphanedTable           ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- OrphanedTablePartition      ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- OrphanedTableSubPartition   ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- MissingPartCol          ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- OrphanedSeg$            ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- OrphanedIndPartObj#         ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- DuplicateBlockUse           ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- FetUet              ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- Uet0Check               ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- SeglessUET              ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- BadInd$             ... 1102000300 <=  *All Rel* 08/10 18:24:52 PASS

.- BadTab$             ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadIcolDepCnt           ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- ObjIndDobj              ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- TrgAfterUpgrade         ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- ObjType0            ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadOwner            ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- StmtAuditOnCommit           ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadPublicObjects        ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadSegFreelist          ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadDepends              ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- CheckDual               ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- ObjectNames             ... 1102000300 <=  *All Rel* 08/10 18:24:53 PASS

.- BadCboHiLo              ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- ChkIotTs            ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- NoSegmentIndex          ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- BadNextObject           ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- DroppedROTS             ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- FilBlkZero              ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- DbmsSchemaCopy          ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- OrphanedObjError        ... 1102000300 >  1102000000 08/10 18:24:54 PASS

.- ObjNotLob               ... 1102000300 <=  *All Rel* 08/10 18:24:54 PASS

.- MaxControlfSeq          ... 1102000300 <=  *All Rel* 08/10 18:24:55 PASS

.- SegNotInDeferredStg         ... 1102000300 >  1102000000 08/10 18:25:18 PASS

.- SystemNotRfile1         ... 1102000300 >   902000000 08/10 18:25:18 PASS

.- DictOwnNonDefaultSYSTEM     ... 1102000300 <=  *All Rel* 08/10 18:25:18 PASS

.- OrphanTrigger           ... 1102000300 <=  *All Rel* 08/10 18:25:18 PASS

.- ObjNotTrigger           ... 1102000300 <=  *All Rel* 08/10 18:25:18 PASS

---------------------------------------

10-AUG-2024 18:25:18  Elapsed: 29 secs

---------------------------------------

Found 0 potential problem(s) and 0 warning(s)

PL/SQL procedure successfully completed.

Statement processed.

Complete output is in trace file:

/u01/app/oracle/diag/rdbms/xff/xff1/trace/xff1_ora_71148_HCHECK.trc

运气不错,数据字典本身没有损坏,业务直接运行,一切正常(主要原因是在光纤链路不稳定的情况下,客户已经没有往库中写入数据)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2043762.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

TiDB-从0到1-DM工具

TiDB从0到1系列 TiDB-从0到1-体系结构TiDB-从0到1-分布式存储TiDB-从0到1-分布式事务TiDB-从0到1-MVCCTiDB-从0到1-部署篇TiDB-从0到1-配置篇TiDB-从0到1-集群扩缩容TiDB-从0到1-数据导出导入TiDB-从0到1-BR工具 一、DM原理 支持全量抽取数据\检测新的数据变化同步到下游实例…

易基因:RNA修饰N4-乙酰胞苷(ac4C)的调控机制、检测方法及其在癌症中的作用最新研究进展|新方向

大家好&#xff0c;这里是专注表观组学十余年&#xff0c;领跑多组学科研服务的易基因。 N4-乙酰胞苷&#xff08;ac4C&#xff09;是一种高度保守的化学修饰&#xff0c;广泛存在于真核和原核生物RNA中&#xff0c;如tRNA、rRNA和mRNA。这种修饰与多种人类疾病显著相关&#…

【计算机科学的数学基础】二分法查找

二分法查找 问题引入在有序数列中查找 问题引入 问&#xff1a;有15个犯罪嫌疑人排成一排&#xff0c;其中只有1个是真正的“犯人”。你要通过问他们“犯人在哪里&#xff1f;”来找出真正的犯人。没问一次问题都会得到以下3种答案&#xff1a; 我是犯人犯人在我左边犯人在我右…

MATLAB多项式拟合

订阅专栏或下载资源可以获得源代码:https://download.csdn.net/download/callmeup/89632160 拟合和插值 拟合和插值是两种常见的数学方法,用于以某种方式近似或估计实际数据。 拟合是在给定一组已知数据点的情况下,通过选择一个合适的数学模型来拟合数据。拟合的目标是找到…

Mininet应用实践

Mininet应用实践 一、实验目的 &#xff08;1&#xff09;能够运用mininet可视化工具创建网络拓扑结构。 &#xff08;2&#xff09;能够运用mininet交互界面创建网络拓扑结构。 &#xff08;3&#xff09;能够运用python脚本构建网络拓扑结构。 二、实验原理或预习内容 &a…

EmguCV学习笔记 VB.Net 2.2 Matrix类

版权声明&#xff1a;本文为博主原创文章&#xff0c;转载请在显著位置标明本文出处以及作者网名&#xff0c;未经作者允许不得用于商业目的。 EmguCV学习笔记目录 Vb.net EmguCV学习笔记目录 C# 笔者的博客网址&#xff1a;VB.Net-CSDN博客 教程相关说明以及如何获得pdf教程…

*(论文解读)Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation

Prompt-Based Distribution Alignment for Unsupervised Domain Adaptation 用于UDA的基于提示的分布对齐&#xff08;二区论文&#xff09; 摘要 近年来&#xff0c;尽管大型视觉语言模型&#xff08;VLM&#xff09;在大规模的下游任务中取得了前所未有的成功&#xff0c;…

HTML标签简明通俗教程

HTML标签简明通俗教程 基本知识 HTML&#xff1a;是超文本标记语言&#xff08;Hyper Text Markup Language&#xff09;的缩写&#xff0c;它是用于创建网页的标准标记语言。标签是构成HTML文档的基本单位。 【HTML中的标签&#xff08;tag&#xff09;和元素&#xff08;e…

一款手机壳凭什么卖800元?Casetify品牌策略全解析 | 品牌出海

Casetify官网 巴黎奥运会&#xff0c;张怡宁的手机壳火了。 张怡宁在现场观战并使用手机的照片在网上流传&#xff0c;不是因为这位奥运前冠军&#xff0c;而是她的手机壳。这款满是「花花绿绿」图案的手机壳&#xff0c;迅速被网友发掘出是Casetify品牌的名为「炫彩花卉」的…

Windosw下Visual Studio2022编译OpenCV

OpenCV&#xff08;Open Source Computer Vision Library&#xff09;是一个开源的计算机视觉和机器学习软件库。它提供了一系列用于处理图像和视频的算法和函数&#xff0c;包括图像处理、特征检测、物体识别、人脸识别等。OpenCV支持多种编程语言&#xff0c;如C、Python、Ja…

从源码到应用:医疗陪诊系统与在线问诊小程序开发详解

在数字化医疗时代&#xff0c;医疗陪诊系统与在线问诊小程序的开发成为了医疗机构和技术公司关注的焦点。接下来&#xff0c;小编将与您一同深入了解。 一、医疗陪诊系统的核心功能 医疗陪诊系统旨在为患者提供更贴心的医疗服务&#xff0c;通过专业人员陪同患者完成就医过程。…

谷歌如何增加网站被收录的机会?

要增加网站被搜索引擎收录的机会&#xff0c;你需要采取一些有效的措施&#xff0c;要确保网站的内容质量高&#xff0c;内容质量不高的内容&#xff0c;哪怕被收录了&#xff0c;之后也是有很大概率会掉的&#xff0c;必须确保内容对用户是有价值的&#xff0c;并且是原创的&a…

ppt文件批量设置打开权限密码的方法

为PPT文件批量设置打开权限密码&#xff0c;可以通过Office软件内置的功能或借助第三方软件来实现。对于少量文件可以用PPT内置的密码设置功能实现&#xff0c;但是对于文件比较多的情况下必须要用到第三方的软件来进行批量设置&#xff0c;以下是一些方法。 一、使用Office软件…

立式报工台助力MES系统打造智能硬件解决方案

信息化与自动化的深度结合&#xff0c;使得企业在生产效率、质量控制以及资源管理等方面得以大幅提升。制造执行系统MES作为连接企业管理层与生产现场的重要桥梁&#xff0c;正在愈发得到重视。为了进一步强化MES系统的功能与应用&#xff0c;立式报工台作为一种新兴的智能硬件…

【网络】TCP协议面向字节流和粘包问题

目录 面向字节流 粘包问题 解决粘包问题的方法 个人主页&#xff1a;东洛的克莱斯韦克-CSDN博客 面向字节流 TCP是一种面向字节流的协议&#xff0c;这意味着TCP并不将传输的数据视为独立的消息或报文&#xff0c;而是将其视为一个连续的字节序列。在TCP连接中&#xff0c;发…

通过AI帮我分析实现的2019销售季度对比叠加图

话不多说,看效果 1)先准备销售表内容:高手自测.xlsx 2)向kimi上传文件,并提问 3)得出结果,代码如下: import pandas as pd from pyecharts.charts import Bar, Line, Overlap from pyecharts import options as opts# 读取Excel文件 df pd.read_excel(高手自测3.xlsx)# 数据预…

jenkins工具配置

上一篇&#xff08;https://blog.csdn.net/abc666_666/article/details/141207741&#xff09;文章我们介绍了基于docker安装jenkins的过程&#xff0c;本文将介绍如何配置jenkins的相关全局工具如maven、 jdk以及git等 配置的页面如下&#xff1a; 打开后的页面如下&#xff…

JookDB和MobaXterm下载安装使用

文章目录 1.使用背景2.MobaXterm的下载安装使用3.JooKDB的下载安装使用 1.使用背景 由于xshell和xftp等工具都是收费的&#xff0c;即使有破解版但是有的公司里不让用盗版的软件。可以使用MobaXterm来替代。 同理可使用JooKDB来代替收费的navicat 来连接数据库。 2.MobaXterm…

机器学习深度学习中的搜索算法浅谈

机器学习&深度学习中的搜索算法浅谈 搜索算法是计算机科学中的核心算法&#xff0c;用于在各种数据结构&#xff08;如数组、列表、树、图等&#xff09;中查找特定元素或信息。这些算法不仅在理论上具有重要意义&#xff0c;还在实际应用中扮演着关键角色。本文将详细探讨…

vulnhub靶机:DC-4

目录 导入靶机 信息收集 发现IP 目录扫描 端口扫描 访问 web 弱口令爆破 反弹shell 获得交互式 shell 提权 使用 hydra 暴力破解 SSH 连接 jim 用户 登录charles账户 使用 teehee 创建 root 用户 导入靶机 点击重试 然后网卡换成 NAT模式&#xff0c;开启靶机 信息…