Monday, January 12, 2026

Interview Question 22 : Explain about oracle database each stage in open till open include nomount , mount , open ?

 

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:
    • spfile or pfile

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

STARTUP NOMOUNT;

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

STARTUP MOUNT;

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

ALTER DATABASE OPEN;

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)

ALTER DATABASE OPEN;

b) READ ONLY

ALTER DATABASE OPEN READ ONLY;

Used for:

  • Reporting
  • Data verification
  • Standby databases

c) RESTRICTED

ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER DATABASE OPEN;

Only users with RESTRICTED SESSION privilege can connect.


Diagram

OPEN
|
|-- Data files opened
|-- Redo log files opened
|-- Users allowed
|-- Database operational

Summary Table

StageInstanceControl FilesData FilesRedo LogsUser 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:

SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
CREATE CONTROLFILE ...
ALTER DATABASE MOUNT;

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

As cloud database Administrator, how we can use Today AI (generative AI , agentic AI etc ) ?

  How a Cloud Database Administrator Can Use Today’s AI Modern DBAs are moving from reactive operations → intelligent, automated operations ...