---
title: OceanBase 数据库 V4.2.1 BP2 版本中存在相同用户名情况下将导致自动统计信息收集报 -4016 Internal error 错误-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 OceanBase 数据库 V4.2.1 BP2 版本中存在相同用户名情况下将导致自动统计信息收集报 -4016 Internal error 错误相关的常见问题和使用技巧，帮助您快速解决 OceanBase 数据库 V4.2.1 BP2 版本中存在相同用户名情况下将导致自动统计信息收集报 -4016 Internal error 错误的难题。
---
切换语言

- 简体中文
- English

划线反馈

# OceanBase 数据库 V4.2.1 BP2 版本中存在相同用户名情况下将导致自动统计信息收集报 -4016 Internal error 错误

更新时间：2026-05-15 09:06

适用版本： V4.2.x 内容类型：Troubleshoot  

## 问题现象

OceanBase 数据库 V4.2.1 BP2 版本中自动统计信息收集报错 `-4016 Internal error`，如下图所示。

![image01](https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/doc/img/knowledge-base/database/performance/20250613obv421bp2-automatic-statistics-collection-error-4016-internal01.png)

关键日志信息如下。

```shell
[2024-01-09 09:57:00.011182] WDIAG [SERVER] init_env (ob_dbms_sched_job_executor.cpp:119) [1896656][T1008_L0_G0][T1008][xxxxx-xxxxx-xxxxx-xxxxx] [lt=22][errcode=-4016] fail to check (1 == user_infos.count())(ret=-4016, "job_info"="job_info", ::oceanbase::common::check_char_array(job_info)={tenant_id_:1008, job_:2, job_name_:"TUESDAY_WINDOW", lowner_:"root", powner_:"root", cowner_:"oceanbase", last_modify_:1704765420000820, start_date_:0, last_date_:1704326400031076, this_date_:1704765420000820, next_date_:1704931200000000, end_date_:64060560000000000, total_:3153601992, interval_:"FREQ=WEEKLY; INTERVAL=1", repeat_interval_:"", failures_:4, flag_:0, what_:"DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC(14400000000)", nlsenv_:"", charenv_:"", field1_:"", scheduler_flags_:0, enabled_:true, auto_drop_:false, max_run_duration_:14400, interval_ts_:604800000000}, "user_infos"="user_infos", ::oceanbase::common::check_char_array(user_infos)=[

  {tenant_id:1008, user_id:200001, user_name:"root", host_name:"%", privileges:"PRIV_ALTER,PRIV_CREATE,PRIV_CREATE_USER,PRIV_DELETE,PRIV_DROP....", info:"system administrator", locked:false, ssl_type:0, ssl_cipher:"", x509_issuer:"", x509_subject:"", type:0, grantee_id_array:[], role_id_array:[], profile_id:18446744073709551***},

  {tenant_id:1008, user_id:532715, user_name:"root", host_name:"uap_test2", privileges:"PRIV_FILE", info:"", locked:false, ssl_type:0, ssl_cipher:"", x509_issuer:"", x509_subject:"", type:0, grantee_id_array:[], role_id_array:[], profile_id:18446744073709551***}])

[2024-01-09 09:57:00.011243] WDIAG [SERVER] run_dbms_sched_job (ob_dbms_sched_job_executor.cpp:283) [1896656][T1008_L0_G0][T1008][xxxxx-xxxxx-xxxxx-xxxxx] [lt=6][errcode=-4016] fail to exec run_dbms_sched_job(tenant_id, job_info)(ret=-4016)

```

## 问题原因

MySQL 租户下创建了两个主机名不同、用户名相同的 root 用户，如下图所示。自动收集统计信息调度任务执行时，去查询用户情况，返回两个 root 用户导致内部逻辑判断出错，进而导致任务报错 -4016。

## 问题的风险及影响

自动收集统计信息调度任务报错。

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。

## 影响版本

OceanBase 数据库 V4.2.x 版本。

## 解决方法

升级至问题已修复版本。目前已修复的版本包括 OceanBase 数据库 V4.2.1 BP3（oceanbase-4.2.1.3-103000052023122809）版本。

## 规避方式

删除多余的同名用户。

Previous

[DBA_SCHEDULER_WINDOWS 视图的 NEXT_RUN_DATE 不符合预期](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000743666)

Next

[SQL 执行或查看计划时报错 ERROR 4016 (HY000): Internal error，日志打印 obj1 and obj2 can't compare 的原因和解决方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002999341) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
