oracle 23ai新的后台进程bgnn介绍
前言
昨天发文研究了哪些oracle 后台不能杀 具体文章如下链接
其中23ai中新增了一个后台进程bgnn 但是在oracle 23ai database reference中并没有找到该后台进程
有点不甘心就开了个SR,找oracle 官方来看看这个后台进程是个啥?
oracle 23ai新增后台进程bgnn
oracle suppert很快找到了答案,23ai确实新增bgnn进程,但是该进程的介绍在23ai的database reference里没有,在introduction-to-oracle-rac文档中确有介绍。一般来说database reference中应该包含当前版本的所有的后台进程包含rac的,这里应该是新版本的一个小问题。
-
BG00
: Background ProcessThe
ora_bg
is a standard background process in Oracle RAC environments that performs various maintenance and monitoring tasks. It is responsible for buffer cache management, log writer (LGWR
) process support, checkpoint coordination, background process monitoring, and statistics gathering.
从bg00的介绍来看应该是rac环境下的,但是单实例也是存在的。
kill bg00会怎么样?如下是测试结果
1.正常会有三个后台进程bg00 bg01 bg02
2. kill掉任意一个进程不会引起实例崩溃
3.连续kill掉2个bg进程后,会自动生产一个bg02进程
4.如果这时再去kill掉一个bg进程 则实例崩溃
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bg
oracle 2092278 1 0 13:49 ? 00:00:02 db_bg00_FREE
oracle 2092290 1 0 13:49 ? 00:00:00 db_bg01_FREE
oracle 2092298 1 0 13:49 ? 00:00:01 db_bg02_FREE
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bg
oracle 2030536 1 0 Jul09 ? 00:00:26 db_bg01_FREE
oracle 2030544 1 0 Jul09 ? 00:00:55 db_bg02_FREE
oracle 2092133 2092024 0 13:48 pts/1 00:00:00 grep --color=auto db_bg
[oracle@SZSPLORACLE01T ~]$
[oracle@SZSPLORACLE01T ~]$ kill -9 2030536
[oracle@SZSPLORACLE01T ~]$
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bg
oracle 2030544 1 0 Jul09 ? 00:00:55 db_bg02_FREE
oracle 2092137 1 0 13:48 ? 00:00:00 db_bg02_FREE--->生产一个新的bg02
oracle 2092149 2092024 0 13:48 pts/1 00:00:00 grep --color=auto db_bg
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bg
oracle 2030544 1 0 Jul09 ? 00:00:55 db_bg02_FREE
oracle 2092137 1 0 13:48 ? 00:00:00 db_bg02_FREE
oracle 2092152 2092024 0 13:48 pts/1 00:00:00 grep --color=auto db_bg
[oracle@SZSPLORACLE01T ~]$ kill -9 2030544
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bg
oracle 2092183 2092024 0 13:49 pts/1 00:00:00 grep --color=auto db_bg
alert log 日志
--ATTENTION--
PMON (ospid: 2030436): terminating the instance due to ORA error 12752
2024-07-11T13:49:11.292688+08:00
Instance terminated by PMON, PID = 2030436
如下oracle 官方在23ai EE内侧版本的测试,测试结果和free版本一致
正常会在数据库实例和asm下各有三个bg后台进程
PS:从官方的答复看,23ai EE版本的后台进程还是以ora_开头,应该不会改变几十年的传统命名(free版为啥改为db_开头 奇怪?)
[oracle@node2 ~]$ ps -ef | grep bg
grid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2
grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2
grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2
oracle 13727 1 0 Jul10 ? 00:01:06 ora_bg01_orcl2
oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2
oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2
oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2
oracle 794584 758730 0 06:49 pts/1 00:00:00 grep --color=auto bg
[oracle@node2 ~]$
[oracle@node2 ~]$ kill -9 13727
[oracle@node2 ~]$
[oracle@node2 ~]$ ps -ef | grep bg
grid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2
grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2
grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2
oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2
oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2
oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2
oracle 794850 758730 0 06:49 pts/1 00:00:00 grep --color=auto bg
[oracle@node2 ~]$ ps -ef | grep bg
grid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2
grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2
grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2
oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2
oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2
oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2
oracle 796394 758730 0 06:52 pts/1 00:00:00 grep --color=auto bg
[oracle@node2 ~]$ kill -9 13746
[oracle@node2 ~]$ ps -ef | grep bg
grid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2
grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2
grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2
oracle 796959 758730 0 06:53 pts/1 00:00:00 grep --color=auto bg
--------------alert log-------------------
2024-07-11T06:53:01.722861+00:00
--ATTENTION--
PMON (ospid: 13452): terminating the instance due to ORA error 12752
2024-07-11T06:53:06.687010+00:00
ORA-1092 : opitsk aborting process
2024-07-11T06:53:07.385092+00:00
Shutdown abort by prelim connection
alert log
[oracle@node2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - Production on Thu Jul 11 06:40:19 2024
Version 23.5.0.24.05
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - Production
Version 23.5.0.24.05
SQL> exit
Disconnected from Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - Production
Version 23.5.0.24.05
结论
1.bgnn 标准后台进程,执行各种维护和监视任务。它负责缓冲区缓存管理、日志写入器(LGWR)进程支持、检查点协调、后台进程监控和统计信息收集。
2.虽然介绍是rac环境下的后台进程,其实单实例也会存在
3.异常情况下,可以kill一个bg进程,实例不会崩溃,别连续kill即可
参考文档
Introduction to Oracle RAC
https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/background-processes.html#GUID-86184690-5531-405F-AA05-BB935F57B76D
原文地址:https://blog.csdn.net/xiaofan23z/article/details/140355383
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!