Distinguish precisely between an Oracle instance and a database, and explain how they work together.
Difference Between an Oracle Instance and a Database
In Oracle, instance and database are not interchangeable. A
database is a set of files on disk; an instance is the memory and background
processes that access and manage those files. You start an instance; you open a
database. Keeping that distinction clear helps when troubleshooting, automating startup/shutdown,
or planning high availability.
What Is an Oracle Database?
An Oracle database is the persistent storage on disk:
Data files – store tables, indexes, and LOBs.
Control files – record database structure and checkpoint info.
Online redo log files – record every change for crash recovery.
Archived redo logs – copies of filled redo logs for media recovery and backups.
Flashback logs (if enabled) – support Flashback Database.
These files exist whether the instance is up or down.
What Is an Oracle Instance?
An Oracle instance is the runtime environment that operates on the files:
SGA (System Global Area) – shared memory containing the Database Buffer Cache, Shared Pool (library & dictionary caches), Redo Log Buffer, Large/Java/Streams pools, and Fixed SGA.
The instance is ephemeral, created at startup and gone at shutdown.
Figure 1 - A database (files on disk) served by an instance (memory + processes).
How They Work Together
Startup: The instance starts, allocating the SGA and spawning background processes.
Mount and open: The instance reads control files, mounts the database, then opens the data files and redo logs for use.
Runtime: Clients connect to server processes. Blocks are read into the buffer cache; changes are recorded in the redo log buffer and flushed by LGWR; DBWn writes modified blocks to data files; ARCn archives filled redo logs.
Shutdown: The instance checkpoints, closes files, dismounts the database, and releases memory.
Physical vs. Logical View
Physical structures are the OS-visible files listed above.
Logical structures are database objects such as tablespaces, segments, extents, and tables.
Because logical and physical layers are decoupled, many storage operations (e.g., relocating or renaming a data file) can be managed without altering logical object definitions.
Quick Definitions
Database: the set of physical files on disk that store data and metadata; persists independently of the instance.
Instance: the combination of SGA, PGA, and background processes that access and manage the database files; exists only while Oracle is running.
Everyday Analogy
Think of the database as a document on disk and the instance as the application program that opens and edits it. You can have a document without the app running, but you cannot edit the document until the app (instance) starts.