Summary: in this tutorial, you will learn how to use the Oracle STARTUP command to
start an Oracle Database instance.
To start up a database instance, you use the STARTUP command:
When the Oracle Database starts an instance, it goes through the following stages: NOMOUNT
, MOUNT
, and OPEN
The STARTUP
command allows you to control the stage of the database instance.
NOMOUNT
stage
In the NOMOUNT
stage, Oracle carries the following steps:
· First, search for a server parameter file in the default location. You can override the default behavior by using the SPFILE
or PFILE
parameters in the STARTUP
command.
· Next, read the parameter file to get the values of the initialization parameters.
· Then, allocate the system global area (SGA) based on the initialization parameter settings.
· After that, start the Oracle background processes such as SMON
, PMON
, and LGWR
.
· Finally, open the alert log and trace files and record all explicit parameters to the alert log in the valid parameter syntax.
At the NOMOUNT
stage, Oracle does not associate the database with the instance.
MOUNT
stage:
In the MOUNT
stage, Oracle associates a database with an instance. In other words, the instance mounts the database.
The instance carries the following steps to mount a database:
· First, get the name of the database control files specified in the CONTROL_FILE
initialization parameter.
· Second, open the control files.
· Third, find the name of the data files and the online redo log files.
When a database is mounted, the database is only available to database administrators, not all users
Select instance_name,status from v$instance
OPEN
stage:
In the OPEN
stage, Oracle performs the following actions:
· First, open the online data files in tablespaces other than the undo tablespaces.
· Then, select an undo tablespace. The instance uses the default undo tablespace if an undo tablespace is specified in the UNDO_TABLESPACE
initialization parameter. Otherwise, it will select the first available undo tablespace.
· Finally, open the online redo log files.
When Oracle opens a mounted database, the database is available for normal operations.
Alter database open;
SELECT instance_name,status FROM v$instance;
Leave a Reply