What happens when you startup the Oracle Database

 What happens when you startup the Oracle Database

Database startup requires SYSDBA privilege.

Database startup includes the following steps:

1. Start an instance.
2. Mount the database.
3. Open the database.

Starts an instance 

When you issue a 'Startup' command, 
First stage. is starting up the instance. 
Here, Oracle reads the parameter file (spfile or pfile) in the default location or in the location specified in the startup command. 
Then allocates the memory area (SGA) and starts the background processes. 
Together this is called as the instance. 
Note :-  database is not associated with the instance at this point.
            The instance is now started and the database is in nomount stage.

Mount stage of  the database

Mounting the instance means associating the started instance with a specified database. 
For this, the instance checks the controlfiles specified under CONTROL_FILES parameter and opens it. 
It then reads the control files to find the names of the data files and the online redo log files that it will attempt to access when opening the database.
The database is still closed and only the DBA can access it at this stage.
This stage is normally used for maintenance operations like  renaming datafiles, enabling and disabling archiving options. Adding, dropping, or renaming redo log files is also done in mount stage. For performing full database recovery database is opened in mount stage.

Open stage of the database

This is the final stage and here Oracle opens the online datafiles and redolog files. 
If any of the required files are not present, media recovery is required . 
It also ensures the datafiles are consistent.
Incase of a normal shutdown, the in-memory changes will be written to disk as part of the shutdown checkpoint. 
But if the instance crashed (or shutdown abort), then Oracle Database performs the instance recovery in the next startup.




Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post