Oracle database startup process

Insert picture description here
Start parameter file:

#ls $ ORACLE_HOME / dbs / spfileorcl.ora /u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora
#strings /u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl .ora [Binary file]

Insert picture description here
In the Startup command, different options can be used to control the different startup steps of the database.
1.
What is done in the STARTUP NOMOUNT database:

1. Read parameter file
2. Generate alarm log
3. Allocate memory
4. Start background process

2、STARTUP MOUNT(或alter database mount;)

Get the location of the control file from the parameter file and load the control file into memory.

3、STARTUP(或alter database open;)

This command completes any three steps of creating an instance, installing an instance, and opening a database. If you use the STARTUP NOMOUNT or STARTUP
MOUNT database open command mode, you must use the ALTER DATABASE command to perform the operation of opening the database. For example, if you
open the database with STARTUP NOMOUNT, it means that the instance has been created, but the database is not installed and opened. It is necessary to run the following two commands in order to start the database correctly. ALTER
DATABASE MOUNT; ALTER DATABASE OPEN; And if you
start the database in STARTUP MOUNT mode, you only need to run the following command to open the database: ALTER DATABASE OPEN.

startup = nomount + mount + open

4. Restricted session access mode: (Only users with restricted session permission can create sessions)

alter system enable restricted session; Administrator authorization: grant restricted
session to scott;-grant permission revoke restricted session from
scott;-recovery permission

Insert picture description here
Shutdown of the database (SHUTDOWN)

1、SHUTDOWN NORMAL --如果该命令卡住了  ,就强行杀死DBW0进程
	这是数据库关闭SHUTDOWN命令的确省选项。
	2、SHUTDOWN IMMEDIATE
	这是我们常用的一种关闭数据库的方式,想很快地关闭数据库
	3、SHUTDOWN TRANSACTIONAL
	该选项仅在Oracle 8i后才能够使用。该命令常用来计划关闭数据库
	4、SHUTDOWN ABORT
	数据库处于一种非正常工作状态,需要立即关闭数据库;在启动数据库实例时碰到问题

Restart the database:

SQL> startup force
startup force = shutdown abort + startup
startup force mount = shutdown abort + startup mount

Control script (need to modify vi / etc / oratab [N-> Y])

$ vi $ORACLE_HOME/bin/dbstart
$ vi $ORACLE_HOME/bin/dbshut
Published 52 original articles · won praise 2 · Views 6374

Guess you like

Origin blog.csdn.net/wenwang3000/article/details/99651482