1
When a database is restored to its state at some past target time using Flashback Database, each block changed since that time is restored from the copy of the block in the flashback logs most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs.
为什么不能直接回复到target time呢?
可能我对target time的理解还不是特别准确,假如中午12:00:00误删除了一张表,那么想恢复的话,这个target time应该是11:59:59吗?还是说只要小于12:00:00的时间都可以,根据需求而定。2
记得在文档中看到过这样一句话“在INCREMENTAL BACKUP的时候要检测每个BLOCK的SCN用来判断是否更新过”
每一个BLOCK里都有SCN吗?我刚才去查了下BLOCK的结构,好像没有SCN呀。抑或是存在DATAFILE HEADER里?
When a database is restored to its state at some past target time using Flashback Database, each block changed since that time is restored from the copy of the block in the flashback logs most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs.
为什么不能直接回复到target time呢?
可能我对target time的理解还不是特别准确,假如中午12:00:00误删除了一张表,那么想恢复的话,这个target time应该是11:59:59吗?还是说只要小于12:00:00的时间都可以,根据需求而定。2
记得在文档中看到过这样一句话“在INCREMENTAL BACKUP的时候要检测每个BLOCK的SCN用来判断是否更新过”
每一个BLOCK里都有SCN吗?我刚才去查了下BLOCK的结构,好像没有SCN呀。抑或是存在DATAFILE HEADER里?
2. block也有scn号,block也有header block。
你可以参考我以前对segement block dump的一点总结
“dump ORACLE数据库内部结构-block”CSDN里的
1
我知道FLASHBACK是逻辑上的,可是好像flashback database就是物理层面上的了,一会我去查查文档,记得看到过。
这里用FLASHBACK DATABASE需要用到物理备份吗?不是直接用FLASHBACK LOGS里的BLOCK内容COPY回去就可以了吗?可能刚才我没太描述清楚我的问题,我重新描述一下。
比如说desired target time是11:50,那么按照上面那段英文的描述,首先要把数据库恢复到11:50以前,比如说11:47,然后用REDO LOG去进行ROLL FORWARD到11:50。那为什么不能直接FLASHBACK到11:50而不用REDO LOG呢?2
呵呵 我看了你那篇文章了 几乎看不明白 太高深了
不过大概意思还是看明白了一些
你意思就是说这里提到的BLOCK不是普通的存储数据的BLOCK喽,是组成SEGMENT HEADER或者DATAFILE HEADER的BLOCK
BTW:那个论坛是你自己创建的哦 呵呵 利害
文档里专门有一段话在说FLASHBACK DATABASE的一些使用限制的情况
其中就有表空间被删除、数据文件损坏等 这也就说明了这是个逻辑层面上的操作那我上面说的那种情况应该是可以的吧?就是说在没有数据文件损坏或者表空间被删除掉等这些情况的时候,我直接FLASHBACK DATABASE到11:50,而不必先FLASHBACK到11:47,再应用redo log到11:50。
是的,不知道为什么要应用redo log到11:50,对你这步的意图不明确。
...most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs. 我的意图就是直接FLASHBACK到11:50