concept:
Instance/instance: background process + shared memory is used to manage and control the database
Database/database: A collection of physical files provides data for the instance, such as data files, control files, parameter files, log files, etc.
Database server/database server: software + instance + database
After the instance
oracle database is started, it first divides a space in the memory and starts some processes. The memory and processes are collectively referred to as the oracle database instance. After the database is closed, the instance is shut down. After the instance
oracle database is started, it first divides a space in the memory and starts it. Some processes, and memory and processes are collectively referred to as oracle database instances. After the database is closed, the instance is closed.
A database can correspond to multiple instances, such as two, four, etc., generally there is no single number. Users can access the database through the connected instance, which can achieve load balancing and improve concurrency. This structure is called oracle's RAC technology.
View oracle instance
[oracle@localhost ~]$ ps -ef | grep ora
View related memory
[oracle@localhost ~]$ ipcs
Several important background processes:
- LGWR: Write the data in the log buffer to the redo log.
LGWR trigger conditions:
1. Submitted by the user
2. One-third of the log buffer has not been written to the disk
3. There is a log buffer larger than 1M that has not been written to the disk
4. Every three seconds
5. The data that DBWn needs to write If the SCN is greater than the SCN recorded by LGWR, trigger LGWR write, log write priority (Write-Ahead-Log)
- CKPT: Periodic trigger, update checkpoint information, update to the control file and the header of each data file.
Checkpoint type
Complete checkpoint
Execute ALTER SYSTEM CHECKPOINT
to shut down the instance normally
Incremental checkpoint
Checkpoint queue
This queue is the buffer header corresponding to the dirty data block, dbwn writes according to this
- SMON: In the main, monitor the inside of the instance, instance recovery, such as defragmentation, clean up unused temporary segments.
- PMON: main external, monitoring user connection
Perform process recovery when the user process fails,
clear the database buffer cache,
release the resources used by the user process,
monitor whether the session has idle session timeout
, dynamically register the database service to the listener
- ARCn: Write the full redo log to the archive log.
Can collect transaction processing redo data and transfer the data to an alternate destination
MMON: Self-monitoring and self-management support process
MMNL: MMON auxiliary process
ADDM: Automatic Database Diagnostic Monitor
MMAN: automatic memory management
LREG: monitor the registration process