Site icon IT Tutorial

Alter database open resetlogs in Oracle

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.

 

 

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

 

 

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version