Oracle database architecture, startup process, shutdown process

Source: Internet
Author: User

Tag:recover   ota    contains     library files    over    global    change     mode    src   

I. Oracle DATABASE Architecture
The architecture consists of the following components:
1. Oracle server: Consists of a database instance and a database file, and initiates a server process and assigns the PGA (Program Global Zone) when the user establishes a connection to the server
(1) DB instance (Instance)
A DB instance consists of a number of memory areas and background processes.
(a) Memory area: Shared pool, Database cache, redo log cache, stream pool, and other optional memory areas
(b) Background process: System monitoring process (smon), process monitoring (Pmon), database write process (DBWR), log write process (LGWR), checkpoint process (CKPT), other processes
(2) database files
The database file consists of a data file, a control file, and a redo log file.
(a) Data files: Actual data in the database
(b) Control files: Contains information that maintains the database and verifies the integrity of the database, which is a binary file.
(c) Redo log files: records that contain changes to the database that are used for data recovery in the event of a failure.
2. Server process
3. User process
4. parameter file
Also known as a database initialization file, defines the attributes of a DB instance and contains parameters that allocate space for the memory structure in the SGA.
Divided into pfile files and spfile files.
(a) pfile file: File name default is Init.ora, is a static file, can be edited using a text editor, modified after the need to restart the instance to take effect.
(b) SPFile file: The file name defaults to Spfile<oracle_sid>.ora, which is a binary dynamic file that can only be modified by the ORACLE directive and is directly effective after modification.
Oracle 11g is started by default using SPFile, or you can start a database using pfile files, such as: Startup Pfile= ' D:\init_123.ora '
5. password file
Grant the user to start and close the DB instance.
6. Archive log files


Second, the database startup process
The boot process involves three states: Nomount, Mount, open
1. Nomount Status
Open only the DB instance.
Start with startup Nomount.

C:\users\lc>sqlplus/nolog
Sql> Connect/as SYSDBA
is connected.
Sql> Startup Nomount
The ORACLE routine has been started.
Total System Global area 1686925312 bytes
Fixed Size 2176368 bytes
Variable Size 989858448 bytes
Database buffers 687865856 bytes
Redo buffers 7024640 bytes
Sql> select * from V$controlfile;
Row not selected
Sql> Show parameter control_files;
NAME TYPE VALUE
---------------------------------------------------------------------------------------------------------------
Control_files string D:\APP\LC\ORADATA\TESTDB\CONTROL01. CTL, D:\APP\LC\FLASH_RECOVERY_AREA\TESTDB\CONTROL02. Ctl


Description
SELECT * from V$controlfile; for testing whether the control file is open at this time.
Show parameter control_files; Gets the location of the control file.

2. Mount Status
Locate and open the control file according to the location of the control file in the parameter file, and read various parameter information in the control file, such as the location of the data file and log file.
There are two ways to boot to mount state, one is to boot directly to mount state using the command startup Mount, and the second is to switch to mount state using the ALTER command when the database is in the Nomount state.

Sql> ALTER DATABASE Mount;
The database has changed.

A SELECT * from V$controlfile is used at this time, and information about the control file can be queried.
However, the database is not open and the data file cannot be read, such as a query table error.

3. Open state
The data file is opened and a series of checks are performed, which are used for data recovery;
There are two ways to boot to the open state, one is to use the command startup (the default is open) or startup open to start directly to the open state, and the second is to switch to the open state using the ALTER command when the database is in Nomount or Mount state. When starting the database, you can execute startup directly to start the database to open state, the process will still go through the above three states.

sql> ALTER DATABASE open;
The database has changed.


Third, the database shutdown process
Closing process and start-up instead, experienced close, dismount, shutdown.
Can be closed in step or directly.
Step off:
1. Close Database
Close data files, log files, and so on.

Sql> ALTER DATABASE close;
The database has changed.

2. Dismount Database
Close the control file.

Sql> ALTER DATABASE dismount;
The database has changed.

3. Shutdown database
Close the instance.
Shutdown has 4 parameters: Shutdown Normal (default), shutdown immediate (recommended), shutdown transactional, shutdown abort

sql> shutdown
The database is closed.
The database has been uninstalled.
The ORACLE routine has been closed.

In addition, one test, shutdown immediate after the startup error: The listener is currently unable to identify the service requested in the connection descriptor
Close the current Sqlplus window, start run, Sqlplus/as sysdba, startup

Oracle database architecture, startup process, shutdown process

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.