Instance Architecture   «Prev  Next»

Lesson 2 The difference between an instance and a database
Objective Distinguish between an Oracle instance and a database.

Difference between an Instance and Database in Oracle

The terms 1)instance and 2) database are often used interchangeably, or otherwise slightly abused, in spite of the fact that they each have distinct meanings. I think the reason for this lies with human nature, and our penchant for being somewhat lazy. It's very cumbersome to always say “I started an instance and opened the database.” That does not roll off the tongue too well. It's certainly a lot easier just to say “I started the database.” People who have used Oracle software for years, even those who work for Oracle, will tend to be somewhat lax in their use of these terms, and that's OK--so long as both sides understand what's being said. Still, there are times when precision is important. So make sure that you understand that a database is just the files, and that an instance is processes + memory.

Overview of the Oracle Instance and Database Architecture

An Oracle database server consists of an Oracle database and an Oracle instance. Every time a database is started, a system global area (SGA) is allocated and Oracle background processes are started. The combination of the background processes and memory buffers is called an Oracle instance
An Oracle database is a collection of data treated as a unit. The purpose of a database is to store and retrieve related information. A server reliably manages a large amount of data in a multi-user environment so that many users can concurrently access the same data. All this is accomplished while delivering high performance and a database server also prevents unauthorized access and provides efficient solutions for failure recovery. The Oracle Database is the first database designed for enterprise grid computing, the most flexible and cost effective way to manage information and applications. Enterprise grid computing creates large pools of industry-standard, modular storage and servers. With this architecture, each new system can be rapidly provisioned from the pool of components and there is no need for peak workloads, since capacity can be easily added or reallocated from the resource pools as needed. A database consists of logical structures and physical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting the access to logical storage structures.



Two key terms that you will hear used a lot once you start working with Oracle are instance and database. These terms have very precise meanings in the Oracle world.
  1. Oracle Database: Oracle uses the term database[1] to refer to the collection of files that contain your data. This includes datafiles, redo logs, and control files. You learned about these files in the previous module.
  2. Oracle Instance: Oracle uses the term instance[2] to refer to the processes and memory structures that exist when an Oracle database is open and in use. These processes perform tasks such as writing changed data back to the datafiles, writing the redo log, and archiving filled log files.
    An analogy that I often use to illuminate this concept is to compare Oracle to Microsoft Word. An Oracle database is analogous to a Word document. It is a collection of files containing data. The Oracle instance could be compared to the Microsoft Word application program. In order to do something with your Word document, you need to start Word and open the document. The same applies to Oracle. To do anything with an Oracle database, you need to first start an instance. Once you have an instance running, you can open a database and perform the desired tasks.

Oracle Database Architecture: 1) Database and 2) Instance

A database server is the key to information management. In general, a server reliably manages a large amount of data in a multiuser environment so that users can concurrently access the same data. A database server also prevents unauthorized access and provides efficient solutions for failure recovery.
An Oracle database server consists of a database and at least one database instance (commonly referred to as simply an instance). Because an instance and a database are so closely connected, the term Oracle database is sometimes used to refer to both instance and database. In the strictest sense the terms have the following meanings:

Oracle Processes
Figure 1 - Shows a database and its instance. For each user connection to the instance, a client process runs the application

Physical versus Logical Data

A database can be considered from both a 1) physical and 2) logical perspective.
Physical data is data viewable at the operating system level. For example, operating system utilities such as the Linux ls and ps can list database files and processes. Logical data such as a table is meaningful only for the database. A SQL statement can list the tables in an Oracle database, but an operating system utility cannot. The database has physical structures and logical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting access to logical storage structures. For example, renaming a physical database file does not rename the tables whose data is stored in this file.

[1]Database: A database is a set of files, located on disk, that store data. These files can exist independently of a database instance.
[2]Database instance: An instance is a set of memory structures that manage database files. The instance consists of a shared memory area, called the system global area (SGA), and a set of background processes. An instance can exist independently of database files.

SEMrush Software