oracle 23ai新的后台进程bgnn介绍

前言

昨天发文研究了哪些oracle 后台不能杀 具体文章如下链接

oracle哪些后台进程不能杀?-CSDN博客

其中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 Process

    The 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

  1. kill掉任意一个进程不会引起实例崩溃

3.连续kill掉2个bg进程后,会自动生产一个bg02进程

4.如果这时再去kill掉一个bg进程 则实例崩溃

复制代码
[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bgoracle   2092278       1  0 13:49 ?        00:00:02 db_bg00_FREEoracle   2092290       1  0 13:49 ?        00:00:00 db_bg01_FREEoracle   2092298       1  0 13:49 ?        00:00:01 db_bg02_FREE[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bgoracle   2030536       1  0 Jul09 ?        00:00:26 db_bg01_FREEoracle   2030544       1  0 Jul09 ?        00:00:55 db_bg02_FREEoracle   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_bgoracle   2030544       1  0 Jul09 ?        00:00:55 db_bg02_FREEoracle   2092137       1  0 13:48 ?        00:00:00 db_bg02_FREE--->生产一个新的bg02oracle   2092149 2092024  0 13:48 pts/1    00:00:00 grep --color=auto db_bg[oracle@SZSPLORACLE01T ~]$ ps -ef|grep db_bgoracle   2030544       1  0 Jul09 ?        00:00:55 db_bg02_FREEoracle   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_bgoracle   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 127522024-07-11T13:49:11.292688+08:00Instance terminated by PMON, PID = 2030436

如下oracle 官方在23ai EE内侧版本的测试,测试结果和free版本一致

正常会在数据库实例和asm下各有三个bg后台进程

PS:从官方的答复看,23ai EE版本的后台进程还是以ora_开头,应该不会改变几十年的传统命名(free版为啥改为db_开头 奇怪?)

复制代码
[oracle@node2 ~]$ ps -ef | grep bggrid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2oracle 13727 1 0 Jul10 ? 00:01:06 ora_bg01_orcl2oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2oracle 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 bggrid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2oracle 794850 758730 0 06:49 pts/1 00:00:00 grep --color=auto bg

[oracle@node2 ~]$ ps -ef | grep bggrid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2oracle 13746 1 0 Jul10 ? 00:01:16 ora_bg02_orcl2oracle 13930 1 0 Jul10 ? 00:00:11 ora_rcbg_orcl2oracle 790200 1 0 06:40 ? 00:00:01 ora_bg02_orcl2oracle 796394 758730 0 06:52 pts/1 00:00:00 grep --color=auto bg
[oracle@node2 ~]$ kill -9 13746
[oracle@node2 ~]$ ps -ef | grep bggrid 12725 1 0 Jul10 ? 00:01:34 asm_bg00_+ASM2grid 12733 1 0 Jul10 ? 00:00:55 asm_bg01_+ASM2grid 12739 1 0 Jul10 ? 00:01:05 asm_bg02_+ASM2oracle 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 127522024-07-11T06:53:06.687010+00:00ORA-1092 : opitsk aborting process2024-07-11T06:53:07.385092+00:00Shutdown 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 2024Version 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 - ProductionVersion 23.5.0.24.05
SQL> exitDisconnected from Oracle Database 23ai Enterprise Edition Release 23.0.0.0.0 - ProductionVersion 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

相关推荐
hnlucky14 分钟前
redis 数据类型新手练习系列——Hash类型
数据库·redis·学习·哈希算法
听闻风很好吃27 分钟前
DAY9:Oracle数据库安全管理深度解析
oracle
LucianaiB1 小时前
【金仓数据库征文】_AI 赋能数据库运维:金仓KES的智能化未来
运维·数据库·人工智能·金仓数据库 2025 征文·数据库平替用金仓
时序数据说1 小时前
时序数据库IoTDB在航空航天领域的解决方案
大数据·数据库·时序数据库·iotdb
.生产的驴2 小时前
SpringBoot 封装统一API返回格式对象 标准化开发 请求封装 统一格式处理
java·数据库·spring boot·后端·spring·eclipse·maven
AnsenZhu2 小时前
2025年Redis分片存储性能优化指南
数据库·redis·性能优化·分片
oydcm2 小时前
MySQL数据库概述
数据库·mysql
oioihoii2 小时前
C++23中if consteval / if not consteval (P1938R3) 详解
java·数据库·c++23
带娃的IT创业者2 小时前
《AI大模型趣味实战》基于RAG向量数据库的知识库AI问答助手设计与实现
数据库·人工智能
husterlichf3 小时前
MYSQL 常用数值函数 和 条件函数 详解
数据库·sql·mysql