Monday, March 2, 2020

Check Last Incarnation Restore Time of Oracle Database

Check Last Incarnation Restore Time of Oracle Database



SQL> set linesize 1000
SQL> set pagesize 1000
SQL> SELECT incarnation#, resetlogs_change#, TO_CHAR(resetlogs_time, 'dd-mon-yyyy hh24:mi:ss') db_restored_time , 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 

INCARNATION# RESETLOGS_CHANGE# DB_RESTORED_TIME     DB_RECOVERY_TILL_TIME
------------ ----------------- -------------------- ---------------------------------------------------------------------------
2           1082432 03-mar-2020 02:09:27 03-MAR-20 12.05.55.000000000 AM


SQL> select incarnation#, resetlogs_change# from v$database_incarnation;

INCARNATION# RESETLOGS_CHANGE#
------------ -----------------
1           1069685
2           1082432


To check from RMAN level:

oracle@rac2 dbs]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Mar 3 02:16:17 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: QTEST (DBID=2573381335)

RMAN> list incarnation of database;
using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       QTEST    2573381335       PARENT  1069685    28-FEB-20
2       2       QTEST    2573381335       CURRENT 1082432    03-MAR-20

No comments:

Post a Comment