---
title: Oracle 模式下调用存储过程报错 cursor read uncommited data across commit/rollback not supported-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 Oracle 模式下调用存储过程报错 cursor read uncommited data across commit/rollback not supported相关的常见问题和使用技巧，帮助您快速解决 Oracle 模式下调用存储过程报错 cursor read uncommited data across commit/rollback not supported的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

划线反馈

# Oracle 模式下调用存储过程报错 cursor read uncommited data across commit/rollback not supported

更新时间：2024-01-22 01:56

适用版本： V2.1.x、V2.2.x、V3.1.x、V3.2.x 内容类型：Troubleshoot  

本文介绍 OceanBase 数据库 Oracle 模式下调用存储过程报错 cursor read uncommited data across commit/rollback not supported 的原因和解决方法。

## 问题描述

调用存储过程，报错如下。

```shell
ErrorCode = 600, SQLState = 0A000, Details = ORA-00600: internal error code, arguments: -4007, Not supported feature or function at package body ETL.PKG_P17_ETL_LOAD.PRO_VIP_USER_LOAD , line : 15887, col : 5 at anonymous block , line : 1, col : 0

```

报错日志信息如下。

```shell
WARN  [SQL] do_cursor_fetch (ob_spi.cpp:3299) [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=28] [dc=0] Implementation restriction: cursor can not read uncommited data across commit/rollback(ret=-4007, cursor={id:-1, is_explicit:true, for_update:false, has_hidden_rowid:false, is_streaming:true, isopen:true, fetched:true, fetched_with_row:true, rowcount:1, current_position:-1, current_row:{row:[{"VARCHAR2":"191913148", collation:"utf8mb4_bin", coercibility:"IMPLICIT"}], projector:[0]}, first_row:{row:null, projector:null}, last_row:{row:null, projector:null}, in_forall:false, save_exception:false, forall_rollback:false, read_uncommited:true, trans_id:{hash:13688508984535462002, inc:26474398, addr:"xx.xx.xx.xx:xx", t:1665645489091693}, bulk_rowcount:[], bulk_exceptions:[], spi_cursor:0x7ef6f0d33be0, cursor_flag:0, ref_count:1, is_scrollable:false, last_execute_time:xxxxxx}, ctx->exec_ctx_->get_my_session()->get_trans_desc().get_trans_id()={hash:0, inc:0, addr:"xx.xx.xx.xx:xx", t:0})
WARN  do_cursor_fetch (ob_spi.cpp:3301) [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=38] [dc=0] ORA-00600: internal error code, arguments: -4007, Implementation restriction: cursor read uncommited data across commit/rollback not supported
WARN  [SQL] spi_cursor_fetch (ob_spi.cpp:3499) [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=7] [dc=0] fail to exec do_cursor_fetch(ctx, cursor, OB_INVALID_ID != cursor->get_id() || (package_id != OB_INVALID_ID && OB_INVALID_ID == routine_id), into_exprs, into_count, column_types, type_count, exprs_not_null_flag, pl_integer_ranges, is_bulk, limit, return_types, return_type_count)(ret=-4007)
WARN  [PL] eh_personality (ob_pl_exception_handling.cpp:626) [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=8] [dc=0] >>>>>>>>>>0(version=1, actions=1, exceptionClass=8026031363883532288, lsda=0x7f28c5103000)
WARN  [PL] eh_personality (ob_pl_exception_handling.cpp:626) [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=19] [dc=0] >>>>>>>>>>0(version=1, actions=6, exceptionClass=8026031363883532288, lsda=0x7f28c5103000)
INFO  [PL] ob_pl_package_manager.cpp:1309 [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=6] [dc=0] get pl package from plan cache failed(ret=-5138, package_id=1114080156845034)
INFO  [PL] ob_pl_package_manager.cpp:1309 [81990][0][xxxxx-xxxxxx-xxxxx-xxxxx] [lt=25] [dc=0] get pl package from plan cache failed(ret=-5138, package_id=1114080156845035)

```

## 适用版本

OceanBase 数据库 V2.x 和 V3.x 版本。

## 问题原因

OceanBase 数据库版本中 cursor 不支持读未提交的数据，如果 cursor 的定义中的源表被修改就会报这个防御错误。

## 解决方法

可以在 open 前先把相关修改提交掉绕过。

上一篇

[执行存储过程表达式受限](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000466059)

下一篇

[OceanBase 数据库执行 PL 时，PL 内的 SQL 语句报错 -4003:Array index out of range](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002396428) ![有帮助](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) 咨询热线
