Oracle 11g-oracle Startup and shutdown
Target:
1. Understand the sequence of reading parameter files in oracle-11g startup;
2. understand four states of Oracle;
3. Master the method of State transformation.
1. Read the parameter file in startup
9i before, only static parameter file Pfile file;
9 I started with the introduction of the dynamic parameter file SPFile file.
11g, start the database, Oracle according to Spfilesid.ora,
Spfile.ora, Initsid.ora, and init.ora are searched in order, where the SID is
The service name, also called the Oracle system identifier.
2.four states of Oracle
A. SHUTDOWN instances, databases are off
can execute startup Nomount;
B. Nomount instance starts, including reading the initial parameter file (note the reading order of the initial parameter file), allocating physical memory, starting the background process.
SELECT * from v$bgprocess can be executed;
SELECT * from V$instance;
ALTER DATABASE Mount;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/2F/5C/wKioL1Of5mOSU6i0AACpCiLRKHk702.jpg "title=" Picture 6.png "alt=" wkiol1of5mosu6i0aacpcilrkhk702.jpg "/>
C. Mount database loading complete, to prove that the control file is not a problem, open the control file, you can find the database structure information, but the contents of the user's table is unreadable.
SELECT * from V$database can be executed;
SELECT * from V$tablespace;
SELECT * from V$datafile;
ALTER DATABASE open;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/2F/5C/wKioL1Of5m7QpcArAACm2w8MDFk867.jpg "title=" Picture 7.png "alt=" wkiol1of5m7qpcaraacm2w8mdfk867.jpg "/>
D. Open database is opened and loaded successfully, you can access the user table.
The full format of the database's start command
Startup [nomount | mount | open | force] [restrict] [pfile=filename];
which
startup Force : Forced start, can be used in various modes.
startup Restrict : Restrict mode places the database in open mode ;
at this time only users who restricted session permissions can access the database . With
the maintenance action. After maintenance is complete, disable the restricted session permission for normal user connections.
Four ways to shut down a database
SHUTDOWN normal| transactional| immediate| ABORT
which
NORMAL does not allow new users to connect, waiting for connected users to disconnect themselves
Transactional does not allow new users to connect, waits for connected users to finish all transactions, and then the system automatically disconnects and their connections
IMMEDIATE does not allow new users to connect, does not wait for the connected user to do all the transactions, rolls back the transactions that the user has done, and then the system automatically disconnects and their connections
ABORT forces the disconnection and connection to all users
= = = = = "Practice Analysis understanding
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/2F/5C/wKioL1Of5nuBrnDSAAEBQfjQ5JE021.jpg "title=" Picture 8.png "alt=" wkiol1of5nubrndsaaebqfjq5je021.jpg "/>
Analysis:
1.startup , the first is to read the spfile file, start the background process, allocate physical memory, this is the nomount State; Then load the database, which is done by the control file, the Mount State, the database is open, this is done by the data file, this is the open state.
2.after the Shutdown , the order is opposite, can know;
This article is from the "8898156" blog, please be sure to keep this source http://8908156.blog.51cto.com/8898156/1427283