Oracle数据库启动过程的几个阶段(SHUTDOWN -> NOMOUNT -> MOUNT -> OPEN)

Oracle数据库启动过程的几个阶段:SHUTDOWN -> NOMOUNT -> MOUNT -> OPEN

Oracle数据库启动过程的几个阶段(SHUTDOWN -> NOMOUNT -> MOUNT -> OPEN)_第1张图片

1.shutdown immediate

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL>

2.nomount

When you issue the startup command, the first thing the database will do is enter the nomount stage. During the nomount stage, Oracle first opens and reads the initialization parameter file (init.ora) to see how the database is configured. For example, the sizes of all of the memory areas in Oracle are defined within the parameter file.

After the parameter file is accessed, the memory areas associated with the database instance are allocated. Also, during the nomount stage, the Oracle background processes are started. Together, we call these processes and the associated allocated memory the Oracle instance. Once the instance has started successfully, the database is considered to be in the nomount stage. If you issue the startup command, then Oracle will automatically move onto the next stage of the startup, the mount stage.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  171966464 bytes
Fixed Size                   787988 bytes
Variable Size             145488364 bytes
Database Buffers           25165824 bytes
Redo Buffers                 524288 bytes
SQL>
3.mount

When the startup command enters the mount stage, it opens and reads the control file. The control file is a binary file that tracks important database information, such as the location of the database datafiles.

In the mount stage, Oracle determines the location of the datafiles, but does not yet open them. Once the datafile locations have been identified, the database is ready to be opened.

SQL> startup mount
If you have already started the database instance with the startup nomount command, you might change it from the nomount to mount startup stage using the alter database command:

SQL> alter database mount;

Database altered.

SQL>

4.open

To open the database, you can just use the startup command as seen in this example

SQL> startup 

If the database is mounted, you can open it with the alter database open command as seen in this example:

SQL> alter database open;

Database altered.

SQL>

====================================

start

SQL> startup
ORACLE instance started.
 
Total System Global Area  251658240 bytes
Fixed Size                   788368 bytes
Variable Size             145750128 bytes
Database Buffers          104857600 bytes
Redo Buffers                 262144 bytes
Database mounted.
Database opened.

===EOF===

你可能感兴趣的:(oracle数据库)