In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how flashback database chooses the flashback log that needs to be applied. I hope you will get something after reading this article. Let's discuss it together.
The flashback database process consists of two stages: flashback restore and flashback recover. Flashback restore is apply flashback log,flashback recover and apply redolog.
Recently, when using flashback database, there is a question: which flashback logfile did flashback restore start apply from?
To make this problem clear, let's start with the following two implicit parameters
_ flashback_barrier_interval: the default value is 30 minutes, indicating how often a tag is written to the flashback log. The main content of this tag is the SCN number at that time. Without exception, flashback restore must use the SCN number as the end point of the restore. Flashback log is applied in the reverse order of the scn number from large to small. A higher value of _ flashback_barrier_interval indicates that the data block before image will write to flashback log at a lower frequency when the database changes. So the less IO Flashback log writes consumes on the database, the more redolog you need to apply when flashback recover. If the setting of _ flashback_barrier_interval is relatively small, before image will be written to flashback log,Flashback log writes more frequently and the IO consumption of the database will be higher, but the redolog that needs to be applied in flashback recover will be reduced, because the scn contained in the tag is closer to the target scn we want to flashback. For example, the following tags are already available in flashback log (suppose the tag is written every 30 minutes)
The generation time marker value of the tag
08:00 scn=100
08:30 scn=130
09:00 scn=155
09:30 scn=172
Suppose the time now is 9:38, and we want to flashback to 8:50, then the flashback restore will end at 08:30 in the order of 09apply 30-> 09 redolog-> 08:30. We must rely on redolog from 08:30 to 08:50, that is, we must apply at least 20 minutes of Redolog. If we shorten the write interval of the mark to 10 minutes by using _ flashback_barrier_interval Then flashback recover can only apply redolog for 10 minutes at most. For the effect of _ flashback_barrier_interval on the number of flashback log writes, please see http://blog.itpub.net/53956/viewspace-1602019/.
_ flashback_verbose_info: the default is FALSE, and we set it to TRUE to output more logs during the flashback process
In order to reduce the length, the whole test process was not included, but some illustrative excerpts were made.
-execute flashback database
Flashback database to scn 12723361569813
Log output at flashback database (including alert.log and .trc files)
* Information output of alert.log
Mon Apr 27 14:08:13 2015
Flashback database to scn 12723361569813
Flashback Restore Start
Mon Apr 27 14:08:27 2015
Flashback Restore Complete
Flashback Media Recovery Start
Started logmerger process
Mon Apr 27 14:08:27 2015
Flashback mount Marker scn during SCN 12723361569676 27.03 Mb/sec
Total waited on sequential reads to complete 0.01s
Number of random reads: 1 = > 16Kb per read
Random read speed: 16Kb in 0.04s = > 0.00 Mb/sec
Total waited on random reads to complete 0.01s
No async reads.
Number of position calls/cache misses: 1/1
Record buffer resizes = 0
-
Excluding datafile 7 from restore portion of flashback because it
Does not have any changes before the flashback target.
Excluding datafile 8 from restore portion of flashback because it
Does not have any changes before the flashback target.
-Flashback Parameters-
Target (to-before) scn: 0x0b92.63725c16 [2962.1668439062]
Restore (to-before) scn: 0x0b92.63725c16 [2962.1668439062]
Current inc 1, Restore target inc 1, Recovery target inc 1
Recovery start checkpoint:
Scn: 0x0b92.637251ed [2962.1668436461] 04/27/2015 13:54:24
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.