Organize and organize the knowledge of Oracle. Hope to be of help to everyone.
The startup process for an Oracle DB instance is divided into 3 steps: Launch the instance, load the database, and open the database.
STARTUP [Nomount | mount | open | force] [RESETRICT] [Pfile=filename]
Nomount: Indicates that the startup DB instance does not load the database.
Mount: Indicates launching the instance, loading the database, and keeping the database closed.
Open: Indicates launch instance, load and open database, this is the default option
Force: Indicates terminating the instance and restarting the database.
Resetrict: Used to specify a restricted session mode to start the database.
Pfile: Used to specify the text parameter file to use when launching an instance, filename is the name of the document.
At startup, an Oracle DB instance must read an initialization parameter file so that the parameter configuration information about the instance startup is obtained in a heavy order. If the Pfile parameter is not specified in the Startup statement, Oracle first reads the default location of the server initialization parameter file SPFile, and if the default server initialization parameter file is not found, the text initialization parameter file for the default location is read.
Here are some of the startup patterns listed in the startup syntax
1 Nomount Mode
Only instances (that is, processes that create the various memory structures and services of the Oracle instance) are created, the database is not loaded, and no data files are opened.
Startup Nomount
Note: You typically use Nomount mode to start a DB instance when you create a new database or rebuild a control file.
2 Mount Mode
Launches the instance, loads the database, and keeps the database closed.
Startup Mount
Note: The mount mode is typically used for database maintenance. For example, perform a full database restore operation, change the database's archive mode, and so on.
3 Open Mode
Launch the instance, load and open the database.
Startup
Note: Without any parameters, the open mode starts the DB instance.
4 Force mode
It is mandatory to terminate the instance and restart the database. For example, you can try this startup mode when other startup modes fail.
Startup force
To close a DB instance
Three steps: Close the database, unload the database, and close the Oracle instance.
SHUTDOWN [Normal | transactional | immediate | abort]
Normal: Indicates that the database is closed normally
Transactional: Indicates that the database is closed after all current active transactions have been committed.
Immediate: Indicates that the database is closed immediately within the shortest possible time.
Abort: Indicates that the database is closed in a terminating manner.
1 Mormal Way
Normal mode of shutdown, no time limit.
Shutdown normal
Prevent any user from establishing a new connection
Wait for all currently connected users to actively disconnect
When all users are disconnected, the database is shut down immediately
2 Transactional Way
The transaction is closed so that all currently active transactions can be committed and closed within the shortest possible time.
Shutdown transactional
Prevents the user from establishing a new connection and starting a new transaction.
Waits for all active transactions to be committed after the user is disconnected
When all active transactions are committed, all users are disconnected and the database is closed.
3 Immediate Way
Close immediately.
Shutdown immediate
Does not interrupt the current user's connection, but instead forcibly terminates the user's current active transaction and rolls back the unfinished transaction.
Prevent users from establishing new connections and starting new transactions
Fallback an uncommitted activity transaction
Close the database
4 Abort Mode
Termination closed, mandatory, destructive.
Shutdown abort
Organize users to establish new connections and start new transactions
Cancel uncommitted active transactions instead of fallback
Immediately terminates any SQL statement that is executing
Close the database immediately.
This article from the "Clear Sky" blog, declined reprint!
Oracle Startup and shutdown