Monday, August 25, 2008

Types of Oracle Database Failures

There are six general categories for database related failures.

Statement Failures occur when a single database operation fails, such as insert, delete statment.
User Process Failures happen when the abnormal termination of a user session, any uncommited transaction must be cleaned up
Network Failures can be found when the hardware failures between the server and client. It also includes a listener process fails on Oracle server.
User Error Failures when the operation's result is not what the user intended even there is no error message generated, such as delete or modify data or drop an index.
Instance Failues occurs when the instance shuts down without synchronizing all the database files to the same system change number.
Media Failures that are any type of failure that results in the loss of one or more database files.

Oracle Instance Structure

A database instance is a set of memory structures that manage database files. It includes a memory area (SGA) and several background processes.

The most important SGA components are the following:
Database buffer cache is the memory area that stores copies of data blocks read from data file.
Redo log buffer is a circular buffer that stores redo entries describing changes made to the database.
Shared pool caches various types of program data, such as parsed SQL, PL/SQL code, system parameters and data dictionary information.
Large pool is an optional memory area intended for memory allocations that are larger than is appropriate for the shared pool.
Streams pool stores buffered queue messages and provides memory for Oracle Streams processes
Fixed SGA is an internal housekeeping area.

Background processes run by default in a database instance started.
PMON monitors the other background process and performs process recovery
SMON is in charge of a variety of system-level cleanup duties.
DBWn writes the contents of database buffers to data files.
LGWR manages the redo log buffer.
CKPT updates the control file and data file header with checkpoint information and signals DBWn to write blocks to disk.
MMON performs many tasks related to the Automatic Workload Repository.
REC0 automatically resolves failures in distributed transactions.