Saturday, 8 August 2009

Summary of the Oracle Instance

When you run Oracle, you cause a large chunk of memory to be reserved for Oracle's use. That chunk of memory is called the System Global Area (SGA). It is composed internally of several discrete 'pools' of memory, such as the Buffer Cache and the Shared Pool. Each 'pool' is used to store a particular sort of data for particular purposes -sometimes, 'your' data, so you can see rows from a table; sometimes, Oracle's own internal 'housekeeping' data needed to recover a database or parse a SQL statement.

In addition to grabbing chunks of memory, running Oracle also causes many background processes to be launched. The processes run independently of what users happen to be doing (hence the use of the term background). They perform many different housekeeping tasks which are essential for the health and future recoverability of the database, such as writing your modified data back to disk or periodically 'time-stamping' the database so that we can tell it is healthy and consistent at any given point.

An SGA plus the background processes is known as an Oracle instance. The instance is the name we give to 'Oracle running in memory': it's both the memory the Oracle program consumes and the processes (or threads) it needs to carry out is work. If we were to express this concept in a formula, it might read:

Instance = SGA + Background Processes

One instance can only ever open, read, manage and manipulate the data from one Oracle database. But what exactly constitutes a database is something we need to look at next!

No comments: