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';

相关推荐
司沐_Simuoss4 小时前
Text to SQL系统的千层套路~
数据库·人工智能·sql·语言模型·系统架构
ActionTech7 小时前
MySQL 用好 Optimizer Trace,深刻理解 SQL 优化过程!
sql·mysql·oracle
Mr_Xuhhh7 小时前
MySQL索引深度解析:从原理到实践
数据库·sql·mysql
多多*8 小时前
Mysql数据库相关 事务 MVCC与锁的爱恨情仇 锁的层次架构 InnoDB锁分析
java·数据库·windows·sql·oracle·面试·哈希算法
Monkey的自我迭代8 小时前
实战项目数据桥agent复盘
数据库·python·oracle
何以不说话9 小时前
堡垒机jumpserver
运维·sql
远方160910 小时前
112-Oracle database 26ai下载和安装环境准备
大数据·数据库·sql·oracle·database
Albert Tan10 小时前
Oracle EBS 12.2 审计追踪
数据库·oracle
世界尽头与你10 小时前
(修复方案)CVE-2022-21587: Oracle E-Business Suite 访问控制错误漏洞
数据库·安全·oracle·渗透测试
白帽子凯哥哥10 小时前
网络安全Web基础完全指南:从小白到入门安全测试
前端·sql·web安全·信息安全·渗透测试·漏洞