Category: Oracle
King Goddard
Posted By: Ryein C. Goddard / Bowling on Thursday, July 1st 2010 3:56:59 PM
Just started some classes on Oracle so expect some new stuff coming from me on this database software. I admit I am just learning so if you see any mistakes please let me know.In the Oracle 9i database system there are five mandatory background processes.
- Database Writer (DBWn)
- Log Writer (LGWR)
- Process Monitor (PMON)
- System Monitor (SMON)
- Checkpoint (CkPT)
All of these processes run in the background and control specific areas of the oracle database system.
The DBWn writes all data from the database buffer cache to the data files. These database buffers are referred to as "dirty" buffers. These dirty buffers are written directly to the disk. The DBW stands for Database Writer while the n stands for a system variable representation meaning process number. This is importatnt to know because you are not limited to having only one DBW process running. Apparently this is useful in larger systems that require heavy database writing. There is also something known as a cold buffer. The cold buffer is a buffer that determines if something hasn't been used recently. The way this is calculated is with help from a special algorithm to determine if it falls into these category. The algorithm is the LRU. If you want to learn more about the LRU algorthim go YouTube - LRU Algorithm to watch a nice video that some one made. I didn't make it so thanks for that video.
The LGWR is the process that controls the redo buffer. The process writes to redo log files on disk. In order for the LGWR to write the buffer to disk the user has to issue a COMMIT. Some writing is deferred though until a more opportune time. Other are usually written immediately. The redo log is important in case you COMMIT something that shouldn't of been and you need restore.
The PMON is incredibly important to user error recovery and clean up. The PMON will recover buffer cache and free any unallocated resources. This is a pretty important background process.
The SMON is some what like the PMON in that is performs recovery, but it also performs cleaning procedures on instance start up.
The CkPT is responsible for storing data that helps in recovery. It is the time table of sorts. It creates recovery ids into the redo log file and it also ensures any information in the database buffer cache is written to the data files. The point that is of most importance is the checkpoint position. This means the point in the event of a failure to begin recovery. The DBWn will write all information prior to the checkpoint. This process does not write any data to disk though.
Well that is the first bit of information I can post. Like I said earlier I am learning so if you see any issues please let me know.