Friday , April 26 2024

Oracle Database Architecture Part 3

I will continue to explain Oracle database architecture in this article. I’m adding the following image to be memorable. If you didn’t read the previous articles, I suggest you read these articles.

Oracle Database Architecture Part 1”,

Oracle Database Architecture Part 2

SMON (System Monitor): It is an important process responsible for recovering Oracle Instance. If this process does not work, the database is down.

This process ensures that the instance to open consistently, during the database opening using the online redo log files when the Oracle database is closed inconsistently. This process also allows the recovery of suddenly killed transactions.

We can see this process via the operating system as follows.

When we kill this process through the operating system, the database will shut down suddenly as follows.

PMON (Process Monitor): This process frees up system resources that are used by processes that have failed or are suddenly terminated, and will give back this resources to the server.

It also allows Oracle instance to communicate with the listener.

We can see this process on the operating system as follows.

RECO (Recoverer Process): This process enables the completion of unfinished operations.

DBWn (Database Writer): The DBW process is a process that shuttles between Datafiles and Database Buffer Cache. That is, when a transaction starts, if the corresponding blocks are not in the buffer cache, DBW move these blocks from the datafiles to the Buffer cache. In the same way, it writes the dirty blocks that should be written to the Datafiles to the Datafiles from the Buffer cache.

These processes work when the following events occur, and the changing blocks in Buffer Cache are written to the datafiles.

  • When the memory space in the database buffer cache is full, these blocks are written to the datafiles starting from the oldest blocks in this memory area.
  • If the Checkpoint process is triggered.
  • When a tablespace is set to read-only mode.
  • When a tablespace is taken offline.
  • When any table is dropped or truncated.

The following code can be used to manually write the data in the buffer cache to the datafiles.

LGWR (Log Writer Process): This process is a process that writes the data in the buffer memory to physical files like DBW process. This process runs between the Redo log buffer and the Online Redo log files. Writes transaction information in Redo log buffer to Online redo log files respectively. The LGWR process writes the data in the Redo log buffer to the Online Redo log files when the following conditions occur.

  • When a commit operation occurs
  • When a log switch occurs
  • Every 3 seconds
  • Average, when the redo log size is 1 mb.
  • When 1/3 of the Redo log buffer area is full

CKPT (Checkpoint Process): When this process is triggered, the Database Writer (DBW) process writes dirty blocks in the database buffer cache to datafiles. It also updates the header information of Datafiles.

If this process is triggered at very frequent intervals, the database will slow down because disk I / O will increase.

If it is rarely triggered, it will take some time to recover instance when the Oracle database instance crashes suddenly. Because changing blocks are not written to datafiles and the number of changing blocks is accumulated. Therefore, during the recovery process, the number of blocks to be written from the online redo log to the data files will be more.

Determining the frequency of triggering of this process is important for the above reasons.

ARCn ( archiver process ): This is a process that is activated when the database is in archive mode. This process copies a copy of the redo log file to the archive file during the log switch operation when the online redo log groups are full. Another task of this process is send Redo log files to the “disaster/standby” server in the disaster recovery scenario.

So, I am completing the article series of the Oracle database architecture with this article.

Loading

About Mehmet Salih DEVECİ

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories