Brief information about Oracle database architecture

Oracle Server is a relational database management system (RDBMS), that means a server that manages relational data in a database.

  • A RDBMS is able to Manage large amounts of data in a multiuser environment so that many users can concurrently access the same data
  • Maintain relationships between data
  • Control access to data in terms of security, using its own user authorization concept
  • Recover data to point of known consistency in the event of a system failure
  • Deliver high performance for processing of data requests

Database

An database is a collection of data, logically treated as a unit. Physically, the data is stored in one or more data files on disks. Oracle manages database data in logical units called tablespaces. A database object such as a table is always created in a particular tablespace. A tablespace consists of one or more data files.

Instance

As the database is only a passive part of a database server, some processes and memory structures are needed to access the data and manage the database. The combination of Oracle (background) processes and memory buffers is called an Oracle instance. Every running Oracle database is associated with an Oracle instance. Moreover, every Oracle database needs its own instance.

SGA – System Global Area

Every time an Oracle instance is started, a shared memory region called SGA is allocated. The SGA allocated by an Oracle instance can only be accessed by the processes of this instance.
That means, each instance has its own SGA. The SGA contains copies of data and control information for the corresponding Oracle instance. When an instance shuts down, it De-allocates the SGA.

Processes

Every time an Oracle instance is started, Oracle background processes are started. When an instance shuts down, the processes are stopped. In windows all of these processes are implemented as threads those run within one common OS system process called oracle.exe but in UNIX environment, we can identify these processes as individual OS processes

System Identifier (DBSID)

Every database is uniquely identified in the network by its name called system identifier (SID). On SAP systems, the SID must consist of exactly three characters, the first of which must be an uppercase letter, while the other two can be uppercase letters or digits Ex: DEV, PRO, QAS, D11, Q12, P13…etc. Because the term SID is also used for SAP systems, we consequently
distinguish between the database SID (referred to as DBSID) and the SAP SID (referred to as SAPSID).

Caching of Data

Database data is stored in data files on disks. However, data processing never takes place directly on disks. No matter whether a database client just needs to read some data or even wants to modify it, it is first copied by the associated shadow process from disk to the database buffer cache in the SGA

Data Block

The smallest logical unit Oracle uses for copying data between data files and the buffer cache as well as for managing data in the cache is the data block

Writing of Modified Data

database writer (DBW0) is a special oracle background process will write changed blocks in buffer cache into disk. DBW0 writes changed data blocks into disk in two situations. One is when the dirty blocks reached some certain threshold number and at checkpoint, Check Point Process (CKPT) is responsible for signalling the database writer to do this.

Logging of Modifications

Generally, every RDBMS protocols all data changes in a log, which is written to disk at appropriate times. This happens especially when an database transaction is committed, so that a log of a completed transaction is always stored on the disk. The oracle background processor log writer – LGWR copies entries from the buffer to the online redo log file on disk.

Log Switch

Oracle redo log files do not dynamically grow when more space is needed for redo entries, they rather have a fixed size (on SAP systems typically 40 MB). When the current online redo log file becomes full, the log writer(LGWR) process closes this file and starts writing into the next one: this is called a log switch.

Control Files

Every Oracle database has a control file a small binary file necessary for the database to start and operate successfully. A control file contains entries that specify the physical structure and state of the database, such as tablespace information, names and locations of data files and redo log files, or the current log sequence number. If the physical structure of the
database is altered, then the control file is automatically modified by Oracle to reflect the change.

Checkpoint

Checkpoint is the event of writing all modified buffers in the buffer cache to data files by the database writer(DBW0) process. A checkpoint always occurs at a log switch.

Database Recovery

Online redo logs play a very important role during restart of an Oracle instance and opening of the database, especially after a crash or generally when the instance was not shut down properly. In this situation, Oracle recognizes that the database was not properly shut down and automatically initiates database recovery (also called instance recovery).

Archiving

As the online redo log is limited in size and cannot grow automatically, Oracle must overwrite old redo entries to be able to write new ones. This is the task of a special Oracle background process called archiver (ARC0).

System Monitor (SMON)

  • Performs recovery at instance startup, if necessary
  • Writes alert log information if any other instance process fails
  • Cleans up temporary segments that are no longer in use

Process Monitor (PMON)

  • Monitors shadow processes
  • In case of a crash of a client process PMON rolls back its not
    committed data, stops the corresponding shadow process and
    frees resources that the process was using.

Oracle Directory Structure in SAP

Oracle Directory Structure in SAP

Oracle Directory Structure in SAP

Oracle BIN Directory

Oracle BIN Directory

Leave a Comment