Oracle Database Startup Stages
(From SHUTDOWN to OPEN State)
Oracle database startup happens in three logical stages:
NOMOUNT → MOUNT → OPEN
Each stage gives Oracle access to different components of the database.
1. NOMOUNT Stage
What happens in NOMOUNT?
At this stage:
- ✅ Instance is started
- ✅ Memory structures and background processes are created
- ❌ Database files are NOT accessed
Components Started
During NOMOUNT:
- SGA is allocated
- Background processes start:
- SMON
- PMON
- DBWn
- LGWR
- CKPT
- Initialization parameter file is read:
spfileorpfile
What is NOT Available?
- Control files ❌
- Data files ❌
- Redo log files ❌
📌 At NOMOUNT, Oracle knows how to start, but not which database to open.
Command
When is NOMOUNT Used?
- Creating a new database
- Re‑creating control files
- Troubleshooting severe corruption
- Checking initialization parameters
✅ Example:
CREATE DATABASE testdb;
(Database must be in NOMOUNT state before this command)
Diagram
NOMOUNT
|
|-- SGA allocated
|-- Background processes started
|-- Init. parameters read
2. MOUNT Stage
What happens in MOUNT?
At this stage:
- ✅ Control files are opened
- ✅ Oracle knows the database structure
- ❌ Data files and redo logs are still NOT opened
Oracle now knows:
- Database name
- Data file locations
- Redo log file locations
- SCN and checkpoint information
Command
or
ALTER DATABASE MOUNT;
What is Accessible?
✅ Control files
❌ Data files
❌ Redo logs
❌ User sessions
Only DBA users can connect:
sqlplus / as sysdba
When is MOUNT Used?
- Database recovery
- Renaming a database
- Enabling ARCHIVELOG mode
- Restoring datafiles
- Handling missing or corrupt files
✅ Example:
ALTER DATABASE ARCHIVELOG;
✅ Example:
RECOVER DATABASE;
Diagram
MOUNT
|
|-- Control files opened
|-- Database structure known
|-- No user access
3. OPEN Stage
What happens in OPEN?
At this stage:
- ✅ Data files are opened
- ✅ Redo log files are opened
- ✅ Database is fully operational
Oracle verifies:
- Data files match control file SCN
- Crash recovery (if needed) is completed
- Redo is applied automatically
Command
or simply:
STARTUP;
(Default STARTUP = NOMOUNT → MOUNT → OPEN)
Database in OPEN State
- ✅ Users can connect
- ✅ DML and DDL allowed
- ✅ Transactions possible
- ✅ Applications start working
OPEN Modes
Oracle can open the database in different modes:
a) READ WRITE (Default)
b) READ ONLY
Used for:
- Reporting
- Data verification
- Standby databases
c) RESTRICTED
Only users with RESTRICTED SESSION privilege can connect.
Diagram
OPEN
|
|-- Data files opened
|-- Redo log files opened
|-- Users allowed
|-- Database operational
Summary Table
| Stage | Instance | Control Files | Data Files | Redo Logs | User Access |
|---|---|---|---|---|---|
| NOMOUNT | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
| MOUNT | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
| OPEN | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Real‑World DBA Example
Scenario: Control file corruption
Steps:
ALTER DATABASE OPEN;
Interview‑Ready One‑Line Explanation
Oracle database startup occurs in three stages: NOMOUNT starts the instance, MOUNT opens control files, and OPEN makes the database available to users by opening data files and redo logs.
No comments:
Post a Comment