Smon System Monitoring Process
Role: Recovery of instances--1, roll forward changes in all redo logs
2. Open the database for users to access
3. Rollback of Things not submitted
--instance recovery does not require DBA action and is automatically completed by Oracle
-After the Startup force command is executed, an instance recovery operation is performed
--Related commands:
ALTER DATABASE Archivelog;
Shutdown mount
Shutdown immediate
Startup Mount
Error: Error at line 1:ora-00265:instance recovery required, cannot set ARCHIVELOG mode
Workaround: Shut down the database before you start
Coincidence free space (unimportant)
Free temporal tablespace (not important)
Pmon Process Monitoring Process
Action: Clears the failed process-1, rolls back the transaction, i.e.: Roolback
2, Release the lock, automatic release
3. Releasing other resources
4. Restart the Dead service
5. Dynamic Registration Listener
--The process is temporarily seen in the list of processes after you kill the Pmon process, but when the Pmon is triggered during the operation,
The database will not find the Pmon process, will be error, resulting in the entire instance is closed
DBWR Database Write process
Role: After the user modifies the data and commits, the modified data is saved in the database buffer cache, through which the updated data is written to the data file of the physical disk
When will trigger the DBWR process: 1, the ckpt process triggered, the first trigger LGWR process, and then trigger the DBWR process
2. When the dirty cache in the database buffer reaches the parameter limit
3. No free cache
4. Timeout occurs
5. RAC Ping Request
6, Table space offline
7. Table space Read-only
8. Table is deleted or truncated
9. Start Backup table Space DBWR number: According to the parameter file setting
32-bit system, the default number of DBWR is 10 (named: DBW0-DBW9), can run up to 10 processes
64-bit system, the default number of DBWR is 10 (named: Dbwa-DBWI), can run up to 20 processes
To view background process statements:
Select name from v$bgprocess where paddr <> ' 00 ';
To view the current set number of DBWR process statements:
Show Parameter Db_w
To modify the number of DBWR process statements:
Alter system set db_writer_processes=2 Scope=spfile;
Startup force;--> Recovery Instance
Process: Database Buffer--DBWR---Database files
LGWR Log Write process
Function: Log information that is stored in redo log buffer is written to the log file of the physical disk through the process
When will the LGWR process be triggered: 1, commit when committed
2. When the redo log buffer space reaches One-third full
3. When the log file size is 1M
4. Every three seconds
5, before the DBWR process to write the time
The log write operation must be before the data is written: Because the purpose of the log is to restore the database, if the first data write operations, the server has an exception at this time,
In the data recovery according to the log, because the operation was not recorded in the log, so the server can not recover the exception before the data write operations,
Therefore, the log write operation must precede the data write operation.
Number of LGWR: default is 1
Optimization: Because the log write operation before the data write operation, so in the IO performance must be fast, assuming that the data write IO performance quickly, and the performance of the log write operation is unpleasant,
can also result in a low overall performance
View Log Buffer space statement: Show parameter Log_buff
Flow: Log_buff---LGWR log files
CKPT Checkpoint Process
Concept: A background process used in Oracle to ensure synchronization between log files, data files, and control files must be normal
Function: 1, provide the trigger signal to the DBWR
2. Update the model of all data files
3. Update all control file information
Other background processes
1. Archive process (ARCH/ARCN): If Oracle's data file is lost or corrupted, the database will be fully restored.
At this point the database should be running in archive mode and the archive process will only start in archive mode.
2. Log switchover: In Oracle, redo log files are divided into groups. When a set of redo log files is full, Oracle starts writing down a set of redo logs, which becomes a log switch.
3, archive log: Log switching is done in a circular way, that is, when the last set of log files are full, and then began to write the first set of log files. Therefore, if only redo log files (that is, the database is run in a non-archive mode), it is difficult for the Oracle system to guarantee the full recovery of the data in the database when it encounters a loss or corruption of the data file, because the required redo records are overwritten by the redo log loop The In the archive mode, the ARCN process will copy the changed redo log file contents to the archive log file, the archive log file can be considered as a backup of redo log files, but the archive log file is offline, in addition to replication, the Oracle database during normal operation will not focus on the archive log file, The Oracle system ensures that the group redo logs are not reused until the archive operation for a set of redo logs is complete. Archiving operations in an Oracle database are typically performed automatically. With these archived log files, the Oracle system ensures that data in the database can be fully recovered after data file loss or corruption is encountered.
4. Check if the database is an archive mode statement:
Select Log_mode from V$database;
--Non-archive mode: Noarchivelog
5. Switch to the archive mode step:
(1) Close the database shutdown immediate
(2) booting the database to mount State startup Mount
(3) Set the database schema for archive ALTER DATABASE Archivelog;
(4) Open the database, alter databases open;
(5) Check whether the database is an archive mode select Log_mode from V$database;
6, the number of file processing statements:
Show Parameter Log_archiv
7, modify the number of archive process statement: Up to 30 can be set
alter system set log_archive_max_processes=2;
8, the Log archive statement (that is, the redo log content is copied to the archive log file, each time, a new archive log file will be added)
alter system switch logfile;
9. View the path statement where the archive log file is located:
Show parameter Db_rec;
10. Other background processes:
PNNN: Parallel processes for parallel queries or parallel DML operations
DNNN: Scheduler process, user demand scheduling for shared-mode connections
SNNN: Shared Services process, user requirements action for shared-mode connections
Mman: Memory management process for 10g memory auto-management
Mmon: Memory monitoring process for automatic collection of statistics in 10g performance optimizations
RECO: Distributed recovery process to complete user-defined automated tasks
JNNN: Task execution process for user-Customized automated tasks
Cjqo: Task scheduling process for waking a task process at user-specified time
OCP Chapter III: Database Background process