RMAN / SQL query to Get Oracle Database Incarnation Details

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
What is Database Incarnation?

Database incarnation is effectively a new “version” of the database. A new version or Incarnation happens when you reset the online redo logs using “alter database open resetlogs;”.


Database incarnation comes into following category Current, Parent, Ancestor and Sibling.

Method 1: 
Using SQL query

set pages 1000 lines 120
select INCARNATION# INC#, RESETLOGS_CHANGE# RS_CHANGE#, RESETLOGS_TIME,
PRIOR_RESETLOGS_CHANGE# PRIOR_RS_CHANGE#, STATUS,
FLASHBACK_DATABASE_ALLOWED FB_OK from v$database_incarnation;

      INC# RS_CHANGE# RESETLOGS PRIOR_RS_CHANGE# STATUS  FB_OK
---------- ---------- --------- ---------------- ------- --------------------------
         1          1 17-APR-19               0 PARENT  NO
         2    1920977 26-SEP-19               1 PARENT  NO
         3    2312126 02-OCT-19         1920977 PARENT  NO
         4    2315757 02-OCT-19         2312126 CURRENT NO

advertisements
 
Method 2: 
Using RMAN

oracle@TESTBOX ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Mon Apr 13 05:59:24 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CDB (DBID=2318676857)

RMAN> list incarnation

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       CDB      2318676857       PARENT  1          17-APR-19
2       2       CDB      2318676857       PARENT  1920977    26-SEP-19
3       3       CDB      2318676857       PARENT  2312126    02-OCT-19
4       4       CDB      2318676857       CURRENT 2315757    02-OCT-19

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer