Oracle Startup Process

Source: Internet
Author: User

 

OracleIt takes four States to start,Shutdown,Nomount,Mount,Open,

 

 

 

Shutdown status

The first State has nothing to explain,OracleAll files are quietly lying in the disk, and everything has not started yet. It is in the shutdown status.

 

 

NomountStatus

Starting the instance (nomount)

* Reading the initialization file from $ ORACLE_HOME/DBS in the following order:

-First spfilesid. ora

-If not found then, spfile. ora

-If not found then, initsid. ora

Specifying the pfile parameter with startup overrides the default behavior.

* Allocating the SGA

* Starting the background processes

* Opening the alertsid. log file and the trace files

The database must be named with the db_name parameter either in the initialization

Parameter file or in the startup command.

-----------------------------------------------------------------------

*Read Environment VariablesDBSParameters in (Spfile/pfile)

[Ora10 @ localhost DBS] $PWD

/Ora10/product/10.2.0/db_1/dbs

[Ora10 @ localhost DBS] $ LL

-RW-r ----- 1 ora10 DBA 3584 07-19Spfilechongshi. ora

-RW-r ----- 1 ora10 DBA 3584 07-23Spfile. ora

-RW-r -- 1 ora10 DBA 1106 07-19Initchongshi. ora

The order of search parameter files is shown in the list above. The read priority is

Spfilechongshi. ora> spfile. ora> initchongshi. ora

If none of the three files can be found, the startup will fail.

* StartAlgorithm, Allocate memory

* Start background processes

* OpenAlertsid. LogFiles and tracking files

[Ora10 @ localhost DBS] $SqlplusSQL * Plus: Release 10.2.0.1.0-production on TUE Jul 24 22:33:54 2012 copyright (c) 1982,200 5, Oracle. All Rights Reserved. Enter user-Name:/As sysdbaConnected to an idle instance. SQL>Startup nomount;Oracle instance started. Total system global area 205520896 bytesfixed size 1218532 bytesvariable size 79693852 bytes database buffers 121634816 bytes redo buffers 2973696 bytes

NowNomountStatus.

 

 

Mount status

Mounting a database has des the following tasks:

* Associating a database with a previusly started instance

* Locating and opening the Control Files specified in the parameter file

* Reading the control files to obtain the names and status of the data files and online redo log files. however, no checks are saved med to verify the existence of the data files and online redo log files at this time.

---------------------------------------------------------------------------------

* Associate a database with a started instance 

*In the parameter file (Spfile/pfile) To read the control file. 

View the parameter file:

[Ora10 @ localhost DBS] $ strings spfileora10.ora | more

......

*. Control_files ='/Ora10/product/oradata/ora10/control01.ctl', '/ora10/product/ora 

Data/ora10/control02.ctl ','/ora10/product/oradata/ora10/control03.ctL'

.......

Control file:

[Ora10 @ localhost ~] $CD/ora10/product/oradata/ora10/ 

[Ora10 @ localhost ora10] $ LL

Total954196 

-RW-r ----- 1 ora10 DBA 7061504 07-23 control01.ctl

-RW-r ----- 1 ora10 DBA 7061504 07-23 control02.ctl

-RW-r ----- 1 ora10 DBA 7061504 07-23 control03.ctl

* Read the control file and obtain the data file and online redo log file. However, no check is performed at this time to verify the existing data file and online redo log file. 

[Ora10 @ localhost DBS] $SqlplusSQL * Plus: Release 10.2.0.1.0-production on TUE Jul 24 23:02:28 2012 copyright (c) 1982,200 5, Oracle. All Rights Reserved. Enter user-Name:/As sysdbaConnected to an idle instance. SQL>Startup Mount;Oracle instance started. Total system global area 205520896 bytes fixed size 1218532 bytes variable size 79693852 bytes database buffers 121634816 bytes redo buffers 2973696 bytesDatabase mounted. 

TheMountStatus.MountWhen starting, the following message is displayed:"Database mounted. "The database is ready.

 

 

Open Status

Opening the database into des the following tasks

Opening the online data log files

Opening the onling redo log files

If any of the datafiles or noline redo log files are not present when you attempt to open the database, the Oracle server returns an error.

During this final stage, the Oracle server verfies that all the data files and online redo log files can be opened and checks the consistency of the database. if necessary, the SMON background process initiates instance recovery.

Bytes -----------------------------------------------------------------------------------------

Opening a database includes the following tasks:: 

Open Online Data Log Files

Open Online redo log file

If any data file or non-linear redo log file does not exist, the server returns an error when you attempt to open the database.

In this final stage, the server verifies that all data files and online redo log files can be opened and checked for Database Consistency. If necessary, the system monitoring process starts instance recovery.

 

[Ora10 @ localhost DBS] $Sqlplus/nologSQL * Plus: Release 10.2.0.1.0-production on Wed Jul 25 21:50:55 2012 copyright (c) 1982,200 5, Oracle. All Rights Reserved. SQL>Conn/As sysdbaConnected to an idle instance. SQL>StartupOracle instance started. Total system global area 205520896 bytes fixed size 1218532 bytes variable size 79693852 bytes database buffers 121634816 bytes redo buffers 2973696 bytesDatabase mounted.Database opened.

In the preceding command, if no other information is added after startup, the system will directly start the system to 4th states.

 

 

Three methods of database Shutdown

 

1. Shutdown normal
Close the database normally.


2. Shutdown immediate
Close the database immediately.
Run shutdown immediate in svrmgrl, and the database is not closed immediately,
However, it is disabled only after Oracle executes some cleanup tasks (terminating sessions and releasing session resources ),
When you use shutdown to close a database, shutdown immediate can be used to close the database.


3. Shutdown abort
Directly shut down the database, and the session accessing the database will be suddenly terminated,
If a large number of operations are being performed in the database, it takes a long time to restart the database after the shutdown abort command is executed.

 

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.