oracle数据库查询恢复的日期

Posted on 2023-09-21 15:20  风行天下-2080  阅读(97)  评论(0编辑  收藏  举报

1、

https://blog.51cto.com/u_15338523/6194204

SELECT incarnation#
       ,resetlogs_change#
        ,TO_CHAR(resetlogs_time, 'yyyy-mm-dd hh24:mi:ss') db_restored_time
        ,resetlogs_change#
         --,scn_to_timestamp(resetlogs_change#) db_recovery_till_time
    FROM v$database_incarnation
    WHERE resetlogs_change# !=
   (SELECT MIN(resetlogs_change#) FROM v$database_incarnation
   );

 

 

 

 

 

 

 

2、

-----------------------------------
https://blog.51cto.com/u_15338523/6194204

其实我们可以用下面脚本查询用户管理备份/还原的记录,如下所示:
SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

Session altered.

SQL> set linesize 640;
SQL> set pagesize 60;
SQL> col units for a30;
SQL> col item for a24;
SQL> col type for a16;
SQL> col units for a12;
SQL> col comments for a16;
SQL> col con_id for 999999;
SQL> select * from v$recovery_progress;

 

 



Copyright © 2024 风行天下-2080
Powered by .NET 8.0 on Kubernetes