Background Processes :-
* The relationship between physical (database) and memory sturture maintain and enforced by the Oracle's Background processes.
* Mandatory backgroun processes,
- DBWR -- Database Writer
- LGWR -- Log writer
- PMON -- Process Monitor
- SMON -- System Monitor
- CKPT -- Checkpoint
Database Writer :-
* Database Writer writes when,
- Checkpoint Occur
- Dirty buffer thershold reached
- No free Buffers
- Timeout
- RAC ping request
- Tablespace offline
- Tablespace read only
- Table DROP or Truncate
- Tablespace BEGIN BACKUP
*db writer writes dirty buffer from the database buffer cache to the datafiles.
What is Dirty Buffer?
* A buffer that is currently not in use, and contains data that has been committed but not written back to the disk by the buffer writer process is called a dirty buffer.
* If a user process finds a dirty buffer in the least recently used (LRU) list, it moves the dirty buffer to the write list and continues searching for more dirty buffers.
Log Writer :-
- At commit
- When one-third full
- When there is 1MB of redo
- Every 3 seconds
- Befor DBWN writes
System Monitor :-
* Instance recovery
- Rolls forward changes in the redo logs.
- Opens the database for user access
- Roll back uncommitted transactions.
* Coalesces free space ever 3 sec
* Deallocates temporary segments.
Process Monitor :-
* Cleans up after failed processes by
- Rolling back the transaction
- Releasing locks
- Releasing Other Resources
- Restarts dead dispatchers
What is Checkpoint?
* A checkpoint occurs when the db writer process writes all modified buffers in the sga buffer cache to the database datafiles.
* Data file headers are also updated with the latest checkpoint SCN, even if the file had no changed blocks.
* Checkpoints occur AFTER (not during) every redo log switch.
* set parameter log_checkpoints_to_alert=true to observe checkpoint start and end times in the database alert log.
* Checkpoints can be forced with the Alter system checkpoint command.
What is SCN?
* System Change Number ---> A number,internal to Oracle that is incremented Over time as change vectors are generated,applied and written to the redo log.
* System commit Number ---> A number,internal to oracle that is incremented with each database commit.
0 comments:
Post a Comment