Saturday, July 15, 2006

Oracle Processes

Two general types of processes:
- User processes
- Oracle proceses

Oracle Processes
- Server Proceses
-- Created to handle requests from connected user processes
-- Configuration: dedicated server, shared server

- Background Proceses
-- DBWn, LGWR, CKPT, SMON, PMON, ARCn, RECO, Jnnn, Dnnn, LMS, QMNn

Database Writer (DBWn)
- writes modified blocks from the database buffer cache to the datafile
- Can have many(20 ?) DBWR process: DBW0 to DBW9, DBWa to DBWj
- Writing occurs for two main reasons
-- need to read more blocks reqired by users whereas there is no free space in the buffer cache
-- checkpointing

Log Writer(LGWR)
- Writes redo information from the log buffer in the SGA to all copies of the current redo log file on disk

Checkpoint(CKPT)
- At specific times, all modified database buffer in the SGA are written to the datafiles by DBWn. This event is called a checkpoint
- The checkpoint process is responsible for
-- signaling DBWn at checkpoints
-- updating all the datafiles and control files ( in their headers) of the database to indicate the most recent checkpoint.

notes: distinguish checkpoint event or operation from checkpoint process

System Monitor(SMON)
- Performs recovery when a failed instance starts up again
- With RAC, the SMON process of one instance can perform instance recovery for other instances that have failed
- Clean up temporary segments
- Recovers terminated transactions skipped during recovery because of file-read or offline errors (These transactions are eventually recovered by SMON when the tablespace or file is brought back online.
- Coalesces free extents in the dictionary managed tablespace

Process Monitor (PMON)
- Peforms process recovery when a user process fails
- Cleaning up the cache and freeing resources ( releasing any locks)
- Checks on dispatcher and server processes and restarts them if they have failed

Archiver(ARCn)
- Copies the online redo log files to archival storage after a log switch has occured
- Can specify up to 10 ARCn processes
- Active only a database is in ARCHIVELOG mode and automatic archiving is enabled

Recoverer(RECO)
- Used to resolve distributed transactions that are pending due to a network or system failure in a distributed database

Job Queue Processes(Jnnn)
- Used for batch processing

Dispatcher(Dnnn)
- In a shared server configuration, routing requests from connected user processes to available shared server processes and returning the responses back to the appropriate user processes.

Lock Manager Server(LMS)
- used for inter-instance locking in RAC

Queue Monitor(QMNn)
- (Optional) monitor the message queues for Oracle Advanced Queuing.
- Configure up to 10 queue monitor

No comments: