search
HomeDatabaseMysql TutorialOracle体系结构及备份(十一)bcakground-process

一 什么是后台进程 Oracle后台进程包括数据写进程(DatabaseWriter,DBWR)、日志写进程(Log Writer,LGWR)、系统监控(System Monitor,SMON)、进程监控(Process Monitor,PMON)、检查点进程(Checkpoint Process,CKPT)、归档进程、服务进程、用户进程。 数据写进程

一 什么是后台进程


        Oracle后台进程包括数据写进程(DatabaseWriter,DBWR)、日志写进程(Log Writer,LGWR)、系统监控(System Monitor,SMON)、进程监控(Process Monitor,PMON)、检查点进程(Checkpoint Process,CKPT)、归档进程、服务进程、用户进程。

 

        数据写进程:负责将更改的数据从数据库缓冲区高速缓存写入数据文件

 

        日志写进程:将重做日志缓冲区中的更改写入在线重做日志文件

 

        系统监控:检查数据库的一致性如有必要还会在数据库打开时启动数据库的恢复

 

        进程监控:负责在一个Oracle 进程失败时清理资源

 

        检查点进程:负责在每当缓冲区高速缓存中的更改永久地记录在数据库中时,更新控制文件和数据文件中的数据库状态信息。该进程在检查点出现时,对全部数据文件的标题进行修改,指示该检查点。在通常的情况下,该任务由LGWR执行。然而,如果检查点明显地降低系统性能时,可使CKPT进程运行,将原来由LGWR进程执行的检查点的工作分离出来,由CKPT进程实现。对于许多应用情况,CKPT进程是不必要的。只有当数据库有许多数据文件,LGWR在检查点时明显地降低性能才使CKPT运行。CKPT进程不将块写入磁盘,该工作是由DBWR完成的。 init.ora文件中 CHECKPOINT_PROCESS 参数控制CKPT进程的使能或使不能。缺省时为FALSE,即为使不能。

 

        归档进程:在每次日志切换时把已满的日志组进行备份或归档

 

        服务进程:用户进程服务。

 

        用户进程:在客户端,负责将用户的SQL语句传递给服务进程,并从服务器段拿回查询数据。


 Oracle体系结构及备份(十一)bcakground-process


        To maximizeperformance and accommodate many users, a multiprocess Oracle Database systemusesbackground processes.Background processes consolidate functions that would otherwise be handled bymultiple database programs running for each user process. Background processesasynchronously perform I/O and monitor other Oracle Database processes toprovide increased parallelism for better performance and reliability.



二 操作示例

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@localhost 桌面]$ ps -ef | grep ora_
oracle    2638     1  0 16:43 ?        00:00:00 ora_pmon_orcl
oracle    2640     1  0 16:43 ?        00:00:00 ora_psp0_orcl
oracle    2642     1  0 16:43 ?        00:00:00 ora_mman_orcl
oracle    2644     1  0 16:43 ?        00:00:00 ora_dbw0_orcl
oracle    2646     1  0 16:43 ?        00:00:00 ora_lgwr_orcl
oracle    2648     1  0 16:43 ?        00:00:00 ora_ckpt_orcl
oracle    2650     1  0 16:43 ?        00:00:00 ora_smon_orcl
oracle    2652     1  0 16:43 ?        00:00:00 ora_reco_orcl
oracle    2654     1  0 16:43 ?        00:00:00 ora_cjq0_orcl
oracle    2656     1  0 16:43 ?        00:00:00 ora_mmon_orcl
oracle    2658     1  0 16:43 ?        00:00:00 ora_mmnl_orcl
oracle    2660     1  0 16:43 ?        00:00:00 ora_d000_orcl
oracle    2662     1  0 16:43 ?        00:00:00 ora_s000_orcl
oracle    2666     1  0 16:43 ?        00:00:00 ora_qmnc_orcl
oracle    2683     1  0 16:43 ?        00:00:00 ora_q000_orcl
oracle    2685     1  0 16:43 ?        00:00:00 ora_q001_orcl
oracle    2720     1  0 16:52 ?        00:00:00 ora_j000_orcl
oracle    2723  2597  0 16:52 pts/0    00:00:00 grep ora_

[oracle@localhost 桌面]$ ps -ef | grep ora_ | egrep "pmon|smon|dbw0|lgw|ckpt"
oracle    2638     1  0 16:43 ?        00:00:00 ora_pmon_orcl
oracle    2644     1  0 16:43 ?        00:00:00 ora_dbw0_orcl
oracle    2646     1  0 16:43 ?        00:00:00 ora_lgwr_orcl
oracle    2648     1  0 16:43 ?        00:00:00 ora_ckpt_orcl
oracle    2650     1  0 16:43 ?        00:00:00 ora_smon_orcl

SQL> desc v$bgprocess;
 Name					   Null?    Type
 ----------------------------------------- -------- ----------------------------
 PADDR						    RAW(4)
 PSERIAL#					    NUMBER
 NAME						    VARCHAR2(5)
 DESCRIPTION					    VARCHAR2(64)
 ERROR						    NUMBER

SELECT * FROM v$bgprocess;

SQL> SELECT * FROM V$bgprocess WHERE paddr'00'
  2  ;

PADDR	   PSERIAL# NAME
-------- ---------- -----
DESCRIPTION							      ERROR
---------------------------------------------------------------- ----------
52A16830	  1 PMON
process cleanup 						 ##########

52A16DE4	  1 PSP0
process spawner 0						 ##########

52A17398	  1 MMAN
Memory Manager							 ##########


PADDR	   PSERIAL# NAME
-------- ---------- -----
DESCRIPTION							      ERROR
---------------------------------------------------------------- ----------
52A1794C	  1 DBW0
db writer process 0						 ##########

52A17F00	  1 LGWR
Redo etc.							 ##########

52A184B4	  1 CKPT
checkpoint							 ##########


PADDR	   PSERIAL# NAME
-------- ---------- -----
DESCRIPTION							      ERROR
---------------------------------------------------------------- ----------
52A18A68	  1 SMON
System Monitor Process						 ##########

52A1901C	  1 RECO
distributed recovery						 ##########

52A195D0	  1 CJQ0
Job Queue Coordinator						 ##########


PADDR	   PSERIAL# NAME
-------- ---------- -----
DESCRIPTION							      ERROR
---------------------------------------------------------------- ----------
52A1B808	  1 QMNC
AQ Coordinator							 ##########

52A19B84	  1 MMON
Manageability Monitor Process					 ##########

52A1A138	  1 MMNL
Manageability Monitor Process 2 				 ##########


12 rows selected.

SQL> col description for a10;
SQL> COL ERROR CLEAR;
SQL> SELECT name FROM v$bgprocess WHERE paddr'00';

NAME
-----
PMON
PSP0
MMAN
DBW0
LGWR
CKPT
SMON
RECO
CJQ0
QMNC
MMON

NAME
-----
MMNL

12 rows selected.
SQL> set pagesize 99;
SQL> SELECT name FROM v$bgprocess WHERE paddr'00';

NAME
-----
PMON
PSP0
MMAN
DBW0
LGWR
CKPT
SMON
RECO
CJQ0
QMNC
MMON
MMNL

12 rows selected.


三 总结


        1.后台进程就是伴随着数据库运行的那些进程,以下几个进程非常重要:DBWR DBWN PMON SMON CKPT。

        2.Linux下通过ps命令可以查看后台进程的信息。



<span><span>我的邮箱</span></span><span>:</span>wgbno27@163.com <span> <span>新浪微博</span></span><span>:</span>@Wentasy27
  <span>微信公众平台</span>:JustOracle(微信号:justoracle)
  <span>IT交流群</span>:336882565(加群时验证 From CSDN XXX)
  <span>Oracle交流讨论组</span>:https://groups.google.com/d/forum/justoracle
  <span><strong>By Larry Wen</strong></span>


Oracle体系结构及备份(十一)bcakground-process Oracle体系结构及备份(十一)bcakground-process Oracle体系结构及备份(十一)bcakground-process
@Wentasy
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools