Dba_oracle Startup/shutdown Startup and shutdown Procedures (concepts) (various maintenance operations on the database) _oracle

Source: Internet
Author: User
Tags rollback terminates oracle database

I. Summary

The complete boot process for the Oracle database is step-by-step and consists of the following 3 steps:

Start instance--> load database--> Open Database

Because the different phases of the Oracle database startup process can perform different maintenance operations on the database and correspond to our different requirements, we need to start the database in different modes.

1. Oracle startup needs to go through four states: SHUTDOWN, Nomount, MOUNT, OPEN

2. Oracle shutdown in four ways: Normal, Immediate, transactional, Abort

3. Start and close the process of detailed



Second, the database startup process

1.NoMount Mode (startup instance does not load database)

(1). Command: Startup Nomount

(2). Explanation: This startup mode creates only instances, does not load the database, and Oracle creates a variety of memory structures and service processes for the instance and does not open any data files.

In Nomount mode, you can access only those data dictionary views associated with the SGA area, including Vparameter, VSGA, vprocess, and Vsession, which are retrieved from the SGA area, regardless of the database.

(3). Mode uses:

Create a new database;
reconstruction of control documents;
2.Mount mode (loading the database without opening the database)

(1). Command: Startup Mount

(2). Explanation: This startup mode loads the database for the instance, but keeps the database closed. Because the database control file needs to be opened when the database is loaded, neither the data file nor the redo log file can read or write, so the user cannot manipulate the database.

In Mount mode, you can access only those views of the data dictionary that are relevant to the control file, including Vthread, Vcontrolfile, Vdatabase, Vdatafile, and V$logfile, which are obtained from the control file.

(3). Mode uses:

renaming the data file;
Add, delete, or rename redo log files;
Perform a full database recovery operation;
Changing the archiving mode of the database;
3.Open mode (Open database normally)

(1). Command: Startup [Open]

(2). Tutorial: Normal 3 Steps to start the database.

(3). Mode uses:

Usually do not do what the database maintenance, like only to do application development, with this model is good;
4. Forced Start mode

(1). Command: Startup force

(2). Use & Explanation:

In some cases, you can try to force startup mode when you are unable to successfully start the database using the preceding various modes.
5. Other

You can also switch between startup modes by using the ALTER DATABASE statement. Also, you can set different states for a database for different operations, such as a/non-restricted state, read-only.

Third, the database shutdown process

1. Nomal (normal shutdown mode)

(1). Order: Shutdown Nomal

(2). Explanation: When the data is normally closed, Oracle performs the following actions:

Prevents any user from establishing a new connection.
Wait for all currently connected users to actively disconnect (in this way Oracle will not immediately disconnect the current user, these users still operate related operations)
Once all users are disconnected, shut down, uninstall the database immediately, and terminate the instance. (therefore, when you normally close the database, you should notify all online users to disconnect as soon as possible)
2. Immediate (immediate shutdown mode)

(1). Order: Shutdown Immediate

(2). Explanation:

Prevents any user from establishing a new connection, while preventing the currently connected user from starting any new transactions.
Oracle does not wait for an online user to voluntarily disconnect, force the user to terminate the current transaction, and rollback any uncommitted transactions. (This approach can take a long time to terminate and rollback transactions if there are too many uncommitted transactions)
Close and unload the database directly, and terminate the instance.
3. Transactional (transaction close mode)

(1). Order: Shutdown Transactional

(2). Explanation: This way is between normal shutdown mode and immediate shutdown, response time will be relatively fast, processing will be more appropriate. The implementation process is as follows:

Prevents any user from establishing a new connection, while preventing the currently connected user from starting any new transactions.
Wait for all uncommitted active transactions to complete, and then disconnect the user immediately.
Close and unload the database directly, and terminate the instance.
4. Abort (terminate close mode)

(1). Order: Shutdown abort

(2). Explanation: This is a more brutal way of shutting down, and you can try to close the database by using a termination method when none of the previous 3 ways could be closed. However, shutting down the database in this way will lose a piece of data information, and when the instance is restarted and the database is opened, the background process Smon performs the instance recovery operation. In general, you should avoid using this method to close the database as much as possible. The implementation process is as follows:

The

prevents any user from establishing a new connection, while preventing the currently connected user from starting any new transactions. The
terminates immediately the currently executing SQL statement.
Any uncommitted transactions are not retired. The
disconnects all users directly, shuts down, unloads the database, and terminates the instance.
&NBSP
Four, the case database starts the entire process

Step1. Sqlplus/' as Sysdba ' sql*plus:release 10.2.0.1.0-production on Sat Mar 3 22:48:27 Copyright (c) 1982,%, Oracl
E. All rights reserved.

Connected to a idle instance. Step2.

Startup Nomount ORACLE instance started. --> Total System Global area 167772160 bytes Fixed Size 1218316 bytes Variable Size 104859892 bytes Datab ASE buffers 58720256 bytes Redo buffers 2973696 bytes oracle@db1:~> Ps-ef | grep ora_ Oracle 3626 1 0 22:48? 00:00:00 ORA_PMON_ORCL1 Oracle 3628 1 0 22:48? 00:00:00 ORA_PSP0_ORCL1 Oracle 3630 1 0 22:48? 00:00:00 ORA_MMAN_ORCL1 Oracle 3632 1 0 22:48? 00:00:00 ORA_DBW0_ORCL1 Oracle 3634 1 0 22:48? 00:00:00 ORA_LGWR_ORCL1 Oracle 3636 1 0 22:48? 00:00:00 ORA_CKPT_ORCL1 Oracle 3638 1 0 22:48? 00:00:00 ORA_SMON_ORCL1 Oracle 3640 1 0 22:48? 00:00:00 ORA_RECO_ORCL1 Oracle 3642 1 0 22:48? 00:00:00 ORA_CJQ0_ORCL1 Oracle 3644 1 0 22:48? 00:00:00 ORA_MMON_ORCL1 Oracle 3646 1 0 22:48? 00:00:00 ORA_MMNL_ORCL1 Oracle 3648 1 0 22:48? 00:00:00 ORA_D000_ORCL1 Oracle 3650 1 0 22:48? 00:00:00 ORA_S000_ORCL1 Step3.
Startup Mount Oracle instance started. --> Total System Global area 167772160 bytes Fixed Size 1218316 bytes Variable Size 104859892 bytes Database buffers 58

720256 bytes Redo buffers 2973696 bytes Database mounted. Step4.

Startup ORACLE instance started. --> Total System Global area 167772160 bytes Fixed Size 1218316 bytes Variable Size 104859892 bytes Database buffers 58
720256 bytes Redo buffers 2973696 bytes Database mounted.
 Database opened.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.