当前位置:网站首页>Difference between redo and undo
Difference between redo and undo
2022-07-01 19:42:00 【Raindrops in June】
Redo stay Oracle In the database , There is a kind of log file called redo log file redo log, Divided into two : Online redo logs and archive logs .
Online redo logs (online redo log) It is mainly used for :Oracle The server where the database is located suddenly loses power 、 Restart or execute shutdown Wait for the command to restart ,Oracle The database cannot start the instance normally . here ,Oracle Will use online redo logs , Restore the database to the Jianyang moment before the server power failure , Make the database start normally .( By default , The database will have at least two redo log groups , Recycling )
Archive log (archive log) Mainly used for hardware level errors : The bad track of the disk makes it impossible to read and write 、 Failed to write 、 Disk damage leads to database data loss . At this time, the database archives log files , Restore the database to the time point where the archived log is located, and then restore the database to the current time point by online redoing the log file .
For archive log files , It can be understood as online redo log file backup . That is, when a redo log file is filled , Archive the log file and keep a backup .( Because it says , Online redo log files will be automatically overwritten ) therefore , Archive log files are backups of old online log files .
Undo Undo data is reverse DML Information required for statement results , go by the name of “ Undo Data ”.
undo data : If the database has been converted, use the undo segment , And automatic revocation management , Then any existing rollback segment must be in offline mode , And cannot be set to online . according to UNDO_MANAGEMENT Different settings of parameters ,Oracle The database either uses undo segments , Or use rollback segments .
undo Table space : A database can have multiple Undo tablespaces , But only one undo table space can be used at any given time . Undo tablespaces must be created as persistent 、 Locally managed table spaces that can automatically expand the allocated space .
DML sentence (insert Insert 、update to update 、delete Delete ), Operation produces redo and undo The most and the least ?
answer :undo: Rollback records the action of reverse operation , It is used to cover water after subsequent implementation . therefore delete Produce the most , The reverse operation of deletion is to insert , It means that the whole line of records is completely inserted back , That is to record all the field information of the table .insert least , The reverse operation is to delete , As long as the mark is positioned to the original position ( because insert Of undo The information is recorded in the inserted record rowid, The only mark , According to this rowid It is enough to locate the inserted record and delete , So as to achieve the purpose of fallback ); and update In the middle , Just record the value of the field before updating and save it .
redo Redo log ,delete Just record the relevant rowid You can delete it again , produce redo least , and insert If you want to finish it again , At least you need to know the values of all fields , Produced redo Definitely most ,update The situation remains the same , It's all in the middle .
undo There will be a corresponding redo?
answer : Meeting ,undo The information of is the front image information for preparing the user to retreat , It is used for the restoration action after everyone regrets their operation , These data also need to be protected , If we lose it, we can't restore it , and redo It is a very good recovery treasure .
DML A feature of the statement :DML Statements are different from query statements , Will change the data in the database . besides , There will also be for future recovery redo And for fallback undo. Another detail is , because undo It also needs protection , So there will be special protection undo Operation of the redo.
边栏推荐
- Introduction and installation of crunch, and making password dictionary with crunch
- ffmpeg 错误码
- JS ternary expression complex condition judgment
- 新窗口打开页面-window.open
- SIP protocol of gb28181
- 118. 杨辉三角
- Summary of SQL query de duplication statistics methods
- Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
- What is the essential difference between Bi development and report development?
- Botu V16 obtains the system time and converts it into a string
猜你喜欢

How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?

How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?

Salesmartly has some tricks for Facebook chat!

Instagram 为何从内容共享平台变成营销工具?独立站卖家如何利用该工具?

Object creation

【无标题】

servlet知识点

1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包

P2433 【深基1-2】小学数学 N 合一

Actual combat of flutter - fast implementation of audio and video call application
随机推荐
Proxy in ES6
win10下使用msys+vs2019编译ffmpeg源码
SQL 入门计划-1-选择
Mysql查询结果去除换行
精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会
【无标题】
解决VSCode下载慢或下载失败的问题
Use the uni app demo provided by Huanxin to quickly realize one-on-one chat
商业智能BI开发和报表开发有什么本质区别?
微信小程序 navigator点击后有阴影 ,去掉navigator阴影效果
ffmpeg AVFrame 转 cv::Mat
Brpc understanding
HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.
P2433 【深基1-2】小学数学 N 合一
Uni app product classification
HLS4ML进入方法
Native JS creates a calendar - supports mouse wheel scrolling to select months - and can be ported to any framework
Opencv video quality diagnosis - VIDEO occlusion diagnosis
brpc理解
Bao, what if the O & M 100+ server is a headache? Use Xingyun housekeeper!