required archivelog files for a guaranteed restore point 查找GRP需要的归档文件

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later

Information in this document applies to any platform.

Goal

How can you determine the required archivelog files needed for a guaranteed restore point before running flashback database?

Solution

The following query should give this information:

SELECT DISTINCT al.thread#, al.sequence#, al.resetlogs_change#, al.resetlogs_time

FROM v$archived_log al,

(select grsp.rspfscn from_scn,

grsp.rspscn to_scn,

dbinc.resetlogs_change# resetlogs_change#,

dbinc.resetlogs_time resetlogs_time

from xkccrsp grsp, vdatabase_incarnation dbinc

where grsp.rspincarn = dbinc.incarnation#

and bitand(grsp.rspflags, 2) != 0

and bitand(grsp.rspflags, 1) = 1 -- guaranteed

and grsp.rspfscn <= grsp.rspscn -- filter clean grp

and grsp.rspfscn != 0

) grsp

WHERE al.next_change# >= grsp.from_scn

AND al.first_change# <= (grsp.to_scn + 1)

AND al.resetlogs_change# = grsp.resetlogs_change#

AND al.resetlogs_time = grsp.resetlogs_time

AND al.archived = 'YES';

相关推荐
山峰哥43 分钟前
数据库工程与索引策略实战指南‌
服务器·数据库·sql·oracle·深度优先
神道君天下1 小时前
填充与积累:积分与面积的可视化
数据库·oracle
喜欢的名字被抢了5 小时前
MySQL核心机制:事务、锁与存储引擎
数据库·sql·mysql·教程
阿演8 小时前
DataDjinn v0.2.11:SQL 编辑、AI 协作和表格操作继续打磨
数据库·人工智能·sql
山峰哥10 小时前
‌Explain实战:打开数据库执行计划的黑盒‌
大数据·服务器·数据库·sql·深度优先·宽度优先
何中应10 小时前
主流 OpenJDK 发行版下载安装
java·oracle·jdk·openjdk
RestCloud21 小时前
借助ETL工具,实现AI智能体+数据的落地
数据仓库·人工智能·sql·etl·etlcloud·数据集成平台·java脚本
Albert Tan1 天前
Oracle EBS 外部应用节点-OOM
oracle·oracle ebs
上海云盾-小余1 天前
网站频繁遭遇 SQL 注入溯源与原生漏洞修复全流程总结
数据库·sql
一十九的酒1 天前
Oracle 12c 标准版无缝升级企业版实战记录
数据库·oracle·标准版切换到企业版