why we run datapatch:
The datapatch utility will run the necessary apply scripts to load the modified SQL files into the database. Entires will be added to both DBA_REGISTRY_HISTORY and DBA_REGISTRY_SQLPATCH views automatically.
DEBAM1> SELECT patch_id, status FROM dba_registry_sqlpatch;
PATCH_ID STATUS
---------- ---------------
22139226 SUCCESS
21948354 SUCCESS
20204035 SUCCESS
22139226 SUCCESS
---------- ---------------
30805558 END
20204035 END
31219939 END
31113348 BEGIN
it will update like begin then end then sucess
Why we use open resetlogs?
Qn 1 :
A RESETLOGS is required in either of
a. Recovery using BACKUP CONTROLFILE
b. Incomplete Recovery
If you are using a Backup controlfile (whether from a Binary Backup or actually via a CREATE CONTROLFILE), the Controlfile is not current -- therefore it does not have the database SCN and LogSequenceNumbers. The RESETLOGS updates this information back to the controlfile (normally, a Recovery is the other way round with the controlfile's SCN, being the highest, driving the Recovery).
Also, a Resetlogs is required in both cases to ensure that the older Redo Logs (e.g. they might still be on disk) are not used -- the Resetlogs creates a new Incarnation of the database.
Qn 2:
There is no difference between an ALTER DATABASE OPEN; and an ALTER DATABASE OPEN NORESETLOGS;.
The NORESETLOGS is the default action in an OPEN if you do not specify RESETLOGS.
(Obviously, Oracle check to see if you have used a Backup Controlfile and/or done an Incomplete Recovery, in which case it does not allow you to OPEN without the RESETLOGS).