I will explain Alter database open resetlogs in Oracle in this post.
Alter database open resetlogs
When you restore database from backup ( prepare test,clone or UAT environment ), You will need to use Alter database open resetlogs after recover database command. Because The RESETLOGS option is always required after incomplete media recovery or recovery using a backup control file.
If you don’t use the RESETLOGS option, you will get the following error.
SQL> startup ORACLE instance started. Total System Global Area 4821853168 bytes Fixed Size 2925024 bytes Variable Size 2056968224 bytes Database Buffers 870425344 bytes Redo Buffers 23848576 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
If you have opened the database with the RESETLOGS option, Oracle database will perform the following operations.
- New Incarnation of database will be created.
- The online redo log files will be created if they do not currently exist.
- Current online redo logfile will be archived, then Oracle will erase the contents of the online redo logs and resets the log sequence number to 1
- The control file will be reinitialized about new online redo logs and redo threads information.
- All current datafiles and online redo logs and all subsequent archived redo logs are updated with a new RESETLOGS SCN and timestamp
You can List all incarnations of database as follows. Each Incarnation is created after RESETLOGS option.
RMAN> list incarnation; List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time ——- ——- ——– —————- — ———- ———- 1 1 T1 6488644328 PARENT 1 07-JUL-14 2 2 T1 6488644328 PARENT 4624168 28-MAR-20 3 3 T1 6488644328 PARENT 8640942 12-APR-20 4 4 T1 6488644328 CURRENT 2460874 28-APR-20
784 views last month, 1 views today