When working with Oracle, understanding the concept of an instance is fundamental.
This article provides a complete explanation of what an Oracle instance is, how it works, and how it is structured — all in a beginner-friendly and visual format.
🔰 What Is an Oracle Instance?
An Oracle instance refers to a memory-based execution environment consisting of:
- SGA (System Global Area)
- Background processes
An instance must be started in order to access the database files.
┌────────────────┐
│ Oracle Instance │
│ (in-memory runtime) │
├────────────────┤
│ ① SGA (shared memory) │
│ ② Background processes │
└────────────────┘
│
▼
┌────────────────────────────┐
│ Oracle Database (physical files) │
└────────────────────────────┘
💡 Difference Between Instance and Database
| Concept | Description |
|---|---|
| Instance | The in-memory execution environment (SGA + processes) |
| Database | The collection of physical files (.dbf, .ctl, .log, etc.) |
🧠 Main Components of an Instance
🔸 SGA (System Global Area)
- Shared Pool: Stores parsed SQLs, PL/SQL, and dictionary caches
- Database Buffer Cache: Stores data blocks read from disk
- Redo Log Buffer: Temporarily holds transaction changes before writing to log files
🔸 Background Processes (Main)
| Process | Role |
|---|---|
| DBWn | Writes buffer cache to disk |
| LGWR | Writes Redo Log Buffer contents to redo log files |
| CKPT | Performs checkpoint operations |
| SMON/PMON | Handles recovery and process monitoring |
🚀 Oracle Instance Startup Phases
The STARTUP command initiates the following startup sequence:
┌────────────┐
│ STARTUP │
└─────┬──────┘
▼
┌────────────┐ ① SGA allocation + read init. param file
│ NOMOUNT │
└─────┬──────┘
▼
┌────────────┐ ② Reads control file
│ MOUNT │
└─────┬──────┘
▼
┌────────────┐ ③ Opens DB files (ready for user access)
│ OPEN │
└────────────┘
🛑 Shutdown Methods and Key Differences
Oracle provides several shutdown options, each with distinct behaviors.
| Mode | Checkpoint | Transaction Handling | Forceful | Notes |
|---|---|---|---|---|
| NORMAL | ✅ Yes | ✅ Waits for disconnects | ❌ | Waits for all users to disconnect |
| IMMEDIATE | ✅ Yes | ✅ Rolls back | ❌ | Fast, clean shutdown |
| TRANSACTIONAL | ✅ Yes | ✅ Waits for commits | ❌ | Waits for active transactions to complete |
| ABORT | ❌ No | ❌ Terminates immediately | ✅ | Force shutdown – requires instance recovery |
❗ Checkpoints are performed in all modes except ABORT.
UseSHUTDOWN ABORTonly in emergencies, as it skips checkpointing and may cause inconsistency until the next startup recovery.
🧩 Instance Structure: Single vs RAC
Single Instance:
One instance → One database
RAC (Real Application Clusters):
Multiple instances (each with SGA & processes) → One shared database
RAC offers high availability and load balancing capabilities.
✅ Summary
| Topic | Description |
|---|---|
| Oracle Instance | In-memory runtime environment of SGA + background processes |
| Startup Phases | NOMOUNT → MOUNT → OPEN |
| Shutdown Modes | All except ABORT ensure safe shutdown with checkpoints |
| Instance vs Database | Instance = Memory-level; Database = Disk-level; both are required |
| RAC Support | Multiple instances can simultaneously access a shared database (RAC setup) |
[reference]
5 Managing the Oracle Instance


コメント