Startup and shutdown under Oracle

Source: Internet
Author: User

Starting and shutting down in Oracle is roughly 3 steps from starting the instance, loading the database, opening the database, shutting down the database, uninstalling the database, shutting down the Oracle instance, respectively. So in Oracle because of this rigorous style, so that in peacetime can according to different circumstances according to the needs of different modes to start and close the database. Here is a brief description of the startup and shutdown under Oracle, the startup and shutdown sections under Oracle need to be performed using SYSDBA's identity, preferably on the server through system authentication, as in the UNIX environment:

[Email protected] ~]$ Sqlplus/as SYSDBA

First, let's start with the following parameters for startup in Oracle:

STARTUP [Nomount|mount|open|force|resetrict] [Prife=filename]

Oracle reads the initialization file from the user's home directory by default, so if you use the Prfile parameter to specify an initialization file that is read by the Oracle by default, this has been mentioned before, and there is no too much explanation here, you need to see:/http blog.51cto.com/jim123/2053015

There are several modes of startup in Startup:

Nomount mode: Indicates that the boot instance does not load the database. In this mode, the memory structure and service processes that start Oracle are not loaded during the database and the data file is not opened, note that the pattern requires SYSDBA identity permission, which is typically used when creating a new database or rebuilding a control file

Sql> Startup Nomountoracle instance started. Total System Global area 4275781632 bytesfixed size 2260088 bytesvariable size 905970568 byte Sdatabase buffers 3355443200 Bytesredo buffers 12107776 bytes

MOUNT mode: Indicates launching an instance, loading the database, and keeping the database closed. This mode is often used for data maintenance, such as data recovery, changing database archiving, database system configuration modification, etc.

Sql> Startup Mountoracle instance started. Total System Global area 4275781632 bytesfixed size 2260088 bytesvariable size 905970568 byte Sdatabase buffers 3355443200 Bytesredo buffers 12107776 bytesdatabase mounted.

Open mode: Launches the instance, loads, and opens the database. Usually the most commonly used mode, for all Oracle users to use the mode that must be used, the default use of startup without any parameters is to use this mode, you can also use open in other modes to start the corresponding function

Sql> Startuporacle instance started. Total System Global area 4275781632 bytesfixed size 2260088 bytesvariable size 905970568 byte Sdatabase buffers 3355443200 Bytesredo buffers 12107776 bytesdatabase mounted. Database opened.

Force mode: Indicates a forced restart of the database, the change mode has a certain mandatory, generally in other modes have been invalidated in the case of the start

Sql> startuporacle instance started. total system global area 4275781632 bytesfixed size                   2260088 bytesvariable  Size             905970568  Bytesdatabase buffers         3355443200 bytesredo  Buffers                12107776 bytesdatabase mounted. database opened. Sql> startup forceoracle instance started. total system global area 4275781632 bytesfixed size                   2260088 bytesvariable  size             905970568 bytesdatabase buffers          3355443200 bytesredo buffers                12107776 bytesdatabase mounted. database opened.

Resetrict mode: Indicates the start of the DB instance to restricted mode, at this time only administrators and users with restricted session permissions can log in to the database, generally used for general internal data maintenance use

Sql> Startup Restrictoracle instance started. Total System Global area 4275781632 bytesfixed size 2260088 bytesvariable size 905970568 byte Sdatabase buffers 3355443200 Bytesredo buffers 12107776 bytesdatabase mounted. Database opened.

There is a start-up in Oracle to shut down, the following is said in Oracle shutdown, the parameters used when shutting down are as follows:

SHUTDOWN [Normal|transactional|immediate|abort]

Normal mode: Graceful shutdown mode, during blocking any new connections, waiting for all the current user session active disconnect, and so on all users of the session disconnected after shutting down the database, do a checkpoint and close the data file, restart without the need for instance recovery

sql> shutdown normaldatabase closed. Database dismounted. ORACLE instance shut down.

Transactional mode: Transaction shutdown mode, block any new connections during the session, do not wait for all users to disconnect, and so on after all the user's transaction commit end, make a checkpoint and close the data file, restart without the need for instance recovery

sql> shutdown transactionaldatabase closed. Database dismounted. ORACLE instance shut down.

IMMEDIATE mode: As the name implies immediately shut down, this way can be as short as possible to close the database, during the blocking of any new connection, do not wait for all users to disconnect the session, not all users of the transaction submission end, not the end of the transaction rollback rollback, Make a checkpoint and close the data file, no instance recovery is required when restarting

sql> shutdown immediatedatabase closed. Database dismounted. ORACLE instance shut down.

Abort mode: Terminate the shutdown mode, block any new connections during the period, do not wait for all users to disconnect the session, not all users of the transaction submitted to the end, do not checkpoint and not close the data file, automatic instance recovery at startup, the method has some destructive, it is possible to lose some of the data, Should try to avoid using in peacetime

sql> shutdown abortoracle instance shut down.

It is important to note that if you use abort to shut down the database, the instance recovery is automatically performed on the next reboot, but there is no guarantee that there will be other problems during the restart, so if you use abort After closing the database, it is recommended to use the Mount mode and then use the immediate mode to close the database to repair the database, as follows

sql> shutdown abortoracle instance shut down. Sql> Startup Mountoracle instance started. Total System Global area 4275781632 bytesfixed size 2260088 bytesvariable size 905970568 byte Sdatabase buffers 3355443200 Bytesredo buffers 12107776 bytesdatabase mounted. sql> shutdown immediateora-01109:database not opendatabase dismounted. ORACLE instance shut down.

Startup and shutdown under Oracle

Related Article

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.