Oracle的实例恢复解析
在数据库服务器异常断电重启后,数据库会进行实例恢复,那么实例恢复的过程中Oracle做了什么操作呢?参考官网在这里做一下解释,菜鸟水平有限,欢迎勘正。
首先说下实例恢复的定义:
Instance recovery is the process of applying records in the online redo log to data files to reconstruct changes made after the most recent checkpoint. Instance recovery occurs automatically when an administrator attempts to open a database that was previously shut down inconsistently.
Oracle Database performs instance recovery automatically in the following situations:
The database opens for the first time after the failure of a single-instance database or all instances of an Oracle RAC database. This form of instance recovery is also called crash recovery. Oracle Database recovers the online redo threads of the terminated instances together.
Some but not all instances of an Oracle RAC database fail. Instance recovery is performed automatically by a surviving instance in the configuration.
The SMON background process performs instance recovery, applying online redo automatically. No user intervention is required.
因此我们知道非一致性关闭会引发实例恢复(一致性关闭不会,参考shutdown immediate的官方定义)同时RAC节点宕机也会在一个存活节点进行实例恢复,其过程就是重构内存中的脏块并提交,同时对未提交的做出回滚,这个过程由smon后台进程负责。
这里上一幅官网的图:
图:Basic Instance Recovery Steps: Rolling Forward and Rolling Back
Instance Recovery Phases
The first phase of instance recovery is called cache recovery or rolling forward, and involves reapplying all of the changes recorded in the online redo log to the data files. Because rollback data is recorded in the online redo log, rolling forward also regenerates the corresponding undo segments.
Rolling forward proceeds through as many online redo log files as necessary to bring the database forward in time. After rolling forward, the data blocks contain all committed changes recorded in the online redo log files. These files could also contain uncommitted changes that were either saved to the data files before the failure, or were recorded in the online redo log and introduced during cache recovery.
After the roll forward, any changes that were not committed must be undone. Oracle Database uses the checkpoint position, which guarantees that every committed change with an SCN lower than the checkpoint SCN is saved on disk. Oracle Database applies undo blocks to roll back uncommitted changes in data blocks that were written before the failure or introduced during cache recovery. This phase is called rolling back or transaction recovery.
Oracle的实例恢复解析的更多相关文章
- SQL Server的实例恢复解析
同Oracle一样,SQL Server在非一致性关闭的时候也会进行实例恢复(Instance Recovery),本文根据stack overflow的文章介绍一些SQL Server实例恢复的知识 ...
- ORACLE实例恢复过程详细分析--使用dump、BBED等多种工具结合分析
---友情提示,内容较多,可以从博文左上的+目录选择小节方便阅读. 实验思路: --实验相关TRACE文件:http://download.csdn.net/detail/q947817003/6 ...
- Oracle 实例恢复
-======================= -- Oracle 实例恢复 --======================= 一.Oracle实例失败 Oracle实例失败多为实例非一致性关闭所 ...
- Oracle Undo与脏读解析
Undo就是用来记录保存事务操作过程中的数据,如果事务发生错误,可以之前的数据进行填补. Undo segment 是保存在表空间上的.Undo 大小是固定的,既然是固定的也就是有限的.如果保存的记录 ...
- dump 验证实例恢复的起点和终点
什么时候会产生实例恢复呢?当你数据库服务器异常断电,重启数据库就会发生实例恢复.实例恢复是由数据库自动完成的,无须DBA的干涉.当然这里有个前提条件:数据文件. 在线日志文件.控制文件不得有损坏. 我 ...
- 大数据应用日志采集之Scribe演示实例完全解析
大数据应用日志采集之Scribe演示实例完全解析 引子: Scribe是Facebook开源的日志收集系统,在Facebook内部已经得到大量的应用.它能够从各种日志源上收集日志,存储到一个中央存储系 ...
- oracle利用redo恢复
oracle媒介恢复(Media Recovery) 官方资料 https://docs.oracle.com/database/121/ADMQS/GUID-CBC5870F-2C9A-4F67-B ...
- Oracle 表空间恢复
为啥要写这个呢,因为之前遇到个场景.操作系统为Solaris的,oracle11.2.0.4. 一个运维把一张关键表drop了.然后发现recyclebin是off的,然后..然后好像只能从备份里面找 ...
- Oracle 数据库实例简介
回到顶部 一:Oracle 数据库实例简介 1:数据库实例的启动顺序: 使用数据库其实就是访问内存.即:数据库实例.数据库的启动是顺序是 先 nomount ----> mount --- ...
随机推荐
- Python中编码和字符串
编码和字符串 编码 在学习回顾中总结一下ASCII编码.Unicode编码和utf-8编码. 计算机中只能处理数字,我们若要处理文本的话就要将文件转换为数字.所以,这就涉及该怎样转换的问题,也就是编码 ...
- 华为路由器帧中继 FR 实验
帧中继简介 帧中继( Frame Relay)是一种用于连接计算机系统的面向分组的通信方法.它主要用在公共或专用网上的局域网互联以及广域网连接.大多数公共电信局都提供帧中继服务,把它作为建立高性能的虚 ...
- Spring Cloud Finchley版中Consul多实例注册的问题处理
由于Spring Cloud对Etcd的支持一直没能从孵化器中出来,所以目前来说大多用户还在使用Eureka和Consul,之前又因为Eureka 2.0不在开源的消息,外加一些博眼球的标题党媒体使得 ...
- IDEA与Eclipse
IDEA 1 快捷键 快速查找某个类 double shift 显示类结构图 ctrl+H 代码上移或下移 ctrl+shift+up/down 查找文件 ctrl+shift+N 删除当前行 ctr ...
- 业务开发(五)—— Java代码
0x01.java.util.NoSuchElementException 表示在线程中访问越界.比如队列为空,这时你要remove()时就会报这个错误 0x02.线程的同步与异步 如果两个业务可以不 ...
- golang包管理解决之道——go modules初探
golang的包管理是一直是为人诟病之处,从golang1.5引入的vendor机制,到准官方工具dep,目前为止还没一个简便的解决方案. 不过现在go modules随着golang1.11的发布而 ...
- Python爬虫之多线程下载豆瓣Top250电影图片
爬虫项目介绍 本次爬虫项目将爬取豆瓣Top250电影的图片,其网址为:https://movie.douban.com/top250, 具体页面如下图所示: 本次爬虫项目将分别不使用多线程和使 ...
- 关于EF中出现FOREIGNKEY约束可能会导致循环或多重级联路径的问题
ef中,我们创建外键的时候需要注意,否则会出现标题所示问题. 例:有项目表,项目收藏表,用户表 项目表有如下字段:ProjectId,InputPersonId等 项目收藏表有如下字段:Project ...
- java面试教程视频
java.从入门到精通.第28讲-面试题评讲:http://www.iqiyi.com/w_19rsdc9mu9.html java面试题 1.面试的整体流程:http://www.iqiyi.com ...
- .NET MVC后台发送post请求
一.WebRequest方式 //设置请求接口 var request = (HttpWebRequest)WebRequest.Create("http://xxx.com/xxx&quo ...