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).




AUTOCONFIG IS NOT RUN FOR ALL PATCHES

  ###############WHY AUTOCONFIG IS NOT RUN DURING PATCH########

 Skipping ...

 Running AutoConfig since none of its templates were

 patched during this run of adpatch.

BLOCK CORRUPTION and BMR

 BLOCK CORRUPTION:

==================

DB maintaince may occur unfortunately and one of the case we can say block corruption.

whenever we find that we are unable to view the data as excepted. We can observer it is block corruption.

Block corruption may happen below scenario's:

1.Hard disk

2.Powerfailuers

3.N/W Issues.

4.OS Issues

 

Identify methods for block corruption:

1.DBA_BLOCKCORRUPTION

2.DBVERIFY='datafile location'(OS COMMANDS).

3.USING RMAN(Validate datafile, tablespace)


Block media recover :

To do Block Media Recover the database should be in mount or open state.

Connect to RMAN target database.

then fire Recover 

CHECKPOINT AND BEGIN BACKUP MODE USES

 CHECKPOINT

============

Checkpoint is mandatory background process which is requested by DBWR when its being writing data from buffer to data files.

It is used for synchronize the buffer and datafiles

Checkpoint only updates header information to data files whenever DBWR completes writing to datafiles.

Checkpoint update Highest SCN number to all Datafiles from buffer. 

Checkpoint occurs from bellow scenario's:

1.DB normal shutdown

2.DBA manual triggered checkpoint.(alter system checkpoint)

3.When its reaches three seconds or PGA_TARGET parameter value.

4.if we defined fast_mttr value then if it reaches fast_mttr.

5.Alter database begin backup mode;

6.when datafile goes offline.