Oracle DBA · Lesson 1
The Instance and the Database
Oracle has two parts: what is running, and the files that keep saved data. Split those, and “the database is down” stops being a vague ticket.
Watch on YouTube
Oracle DBA Lesson 1 — The Instance and the Database
AI Ops Pro
Instance vs database
Instance = memory and processes. That is the part of Oracle that is running.
Database = the collection of files on disk. Table data is saved in those files.
Stop the instance and you release memory and end the processes. The files stay. A clean shutdown does not delete saved table data.
If the instance crashes and the files survive, crash recovery uses redo to make the files consistent at open. If a data file is missing, restarting the instance does not replace it — restore from backup, then recover.
Start, mount, open
- NOMOUNT — start the instance. Memory and background processes come up. The database is not mounted yet.
- MOUNT — identify the database. The instance reads the control file and learns which data files belong. Table data is still not available to applications.
- OPEN — open the data files so applications can read and write.
STARTUP NOMOUNT
STARTUP
SHUTDOWN
As shown in the lesson. Full STARTUP takes you through to open when the files are healthy.
Check where you are
SELECT instance_name, status, database_status
FROM v$instance;
SELECT name, open_mode, database_role
FROM v$database;
Typical STATUS values: STARTED (roughly NOMOUNT), MOUNTED, OPEN.
Gotchas
- Clean shutdown stops the instance; rows in data files remain.
- Instance crash ≠ missing data file.
- Mounted ≠ open for applications.
Quick quiz
Choose one answer per question, then submit. You’ll see the correct answer and a short why.
No comments:
Post a Comment