---
title: 使用 DBLink 访问 LOB 类型时遇到报错：-4007, Not supported feature or function 的原因和解决方法-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于使用 DBLink 访问 LOB 类型时遇到报错：-4007, Not supported feature or function 的原因和解决方法相关的常见问题和使用技巧，帮助您快速解决使用 DBLink 访问 LOB 类型时遇到报错：-4007, Not supported feature or function 的原因和解决方法的难题。
---
切换语言

- 简体中文
- English

划线反馈

# 使用 DBLink 访问 LOB 类型时遇到报错：-4007, Not supported feature or function 的原因和解决方法

更新时间：2026-06-03 03:01

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

## 问题现象

通过 OceanBase 数据库中的 `DBLink` 去访问大数据 LOB 类型时会遇到报错：`ORA-00600: internal error code, arguments: -4007, Not supported feature or function`。

具体示例如下。

1. 通过 `SYS` 用户登录 `Oracle` 租户。

   ```shell
   [root@obxx ~]# obclient -h127.0.0.1 -usys@oracle -P2881 -pxxx -A -c
   Welcome to the OceanBase.  Commands end with ; or \g.
   Your OceanBase connection id is 3221722230
   Server version: OceanBase 4.2.1.6 (r106000022024042414-e43efbffdcc50956239225104e944068375568b6) (Built Apr 24 2024 15:07:44)

   Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

   Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

   ```
 2. 创建连接到远端 OceanBase 数据库的 `DBLink`，名称为 `ob_dblink1`。远端数据库的租户为 `perforacle`。

   ```shell
   obclient [SYS]> CREATE DATABASE LINK ob_dblink1 CONNECT TO sys@perforacle IDENTIFIED BY xxx OB HOST '192.xxx.xxx.58:2881';
   Query OK, 1 row affected (0.056 sec)

   ```
 3. 在 `SYS` 用户下，创建表 `test_lob`。

   ```shell
   obclient [SYS]> create table test_lob (id int, name clob);
   Query OK, 0 rows affected (0.155 sec)

   ```
 4. 退出 `SYS` 用户登录的 `Oracle` 租户。

   ```shell
   obclient [SYS]> Bye

   ```
 5. 通过 `SYS` 用户登录远端数据库的 `perforacle` 租户。

   ```shell
   [root@obxx ~]# obclient -h127.0.0.1 -usys@perforacle -P2881 -pxxx -A -c
   Welcome to the OceanBase.  Commands end with ; or \g.
   Your OceanBase connection id is 3221492652
   Server version: OceanBase 4.2.1.6 (r106000022024042414-e43efbffdcc50956239225104e944068375568b6) (Built Apr 24 2024 15:07:44)

   ```
 6. 在远端数据库的 `perforacle` 租户中 `SYS` 用户下，创建表 `test_lob`。

   ```shell
   obclient [SYS]> create table test_lob (id int, name clob);
   Query OK, 0 rows affected (0.194 sec)

   ```
 7. 在远端数据库的 `perforacle` 租户中 `SYS` 用户下，向表 `test_lob` 插入数据。

   ```shell
   obclient [SYS]> insert into test_lob values (1,'aaaaaa'),(2,'bbbbbb'),(3,'cccccc');
   Query OK, 3 rows affected (0.027 sec)
   Records: 3  Duplicates: 0  Warnings: 0

   ```
 8. 在远端数据库的 `perforacle` 租户中 `SYS` 用户下，提交数据。

   ```shell
   obclient [SYS]> commit;
   Query OK, 0 rows affected (0.001 sec)

   ```
 9. 在远端数据库的 `perforacle` 租户中 `SYS` 用户下，查询表 `test_lob`。

   ```shell
   obclient [SYS]> select * from test_lob;

   ```

   输出结果如下：

   ```shell
   +------+--------+
   | ID   | NAME   |
   +------+--------+
   |    1 | aaaaaa |
   |    2 | bbbbbb |
   |    3 | cccccc |
   +------+--------+
   3 rows in set (0.060 sec)

   ```
 10. 退出远端数据库的 `perforacle` 租户下的 `SYS` 用户。

    ```
 11. 通过 `SYS` 用户登录 `Oracle` 租户。

    ```shell
    [root@obxx ~]# obclient -h127.0.0.1 -usys@oracle -P2881 -pxxx -A -c
    Welcome to the OceanBase.  Commands end with ; or \g.
    Your OceanBase connection id is 3221730163
    Server version: OceanBase 4.2.1.6 (r106000022024042414-e43efbffdcc50956239225104e944068375568b6) (Built Apr 24 2024 15:07:44)

    ```
 12. 在 `SYS` 用户下，查询表 `test_lob`。

    ```shell
    obclient [SYS]> select * from test_lob;
    Empty set (0.009 sec)

    ```
 13. 通过远端数据库名为 `ob_dblink1` 的 `DBLink` 访问查询表 `test_lob`。

    ```shell
    obclient [SYS]> select * from test_lob@ob_dblink1;
    ORA-00600: internal error code, arguments: -4007, Not supported feature or function

    ```
 14. 通过远端数据库名为 `ob_dblink1` 的 `DBLink` 访问查询表 `test_lob` 的 `id` 列。

    ```shell
    obclient [SYS]> select id from test_lob@ob_dblink1;

    ```

    输出结果如下：

    ```shell
    +------+
    | ID   |
    +------+
    |    1 |
    |    2 |
    |    3 |
    +------+
    3 rows in set (0.015 sec)

    ```
 15. 通过远端数据库名为 `ob_dblink1` 的 `DBLink` 访问查询表 `test_lob` 的行数。

    ```shell
    obclient [SYS]> select count(*) from test_lob@ob_dblink1;

    ```

    输出结果如下：

    ```shell
    +----------+
    | COUNT(*) |
    +----------+
    |        3 |
    +----------+
    1 row in set (0.012 sec)

    ```

    ```shell
    obclient [SYS]> select count(1) from test_lob@ob_dblink1;

    ```

    输出结果如下：

    ```shell
    +----------+
    | COUNT(1) |
    +----------+
    |        3 |
    +----------+
    1 row in set (0.011 sec)

    ```

    ```shell
    obclient [SYS]> select count(id) from test_lob@ob_dblink1;

    ```

    输出结果如下：

    ```shell
    +-----------+
    | COUNT(ID) |
    +-----------+
    |         3 |
    +-----------+
    1 row in set (0.009 sec)

    ```

    ```shell
    obclient [SYS]> select count(name) from test_lob@ob_dblink1;
    ORA-00932: inconsistent datatypes

    ```
 16. 通过远端数据库名为 `ob_dblink1` 的 `DBLink` 将远端数据库的 `perforacle` 租户中 `SYS` 用户下的表 `test_lob` 数据插入到 `Oracle` 租户中 `SYS` 用户下的表 `test_lob` 中。

    ```shell
    obclient [SYS]> insert into test_lob select * from test_lob@ob_dblink1;
    ORA-00600: internal error code, arguments: -4007, Not supported feature or function

    ```

## 问题原因

该问题属于已知的功能限制：目前 OceanBase 数据库各个版本的 Oracle 模式都还不支持通过 `DBLink` 读取 `LOB` 字段，而 MySQL 模式从 OceanBase 数据库 V4.2 版本开始支持通过 `DBLink` 读取 `LOB` 字段。 目前通过 DBlink 去访问 原生 Oracle 或者 OceanBase 数据库 Oracle 模式时，下面这些数据类型都是不支持的，会遇到报错：`ORA-00600: internal error code, arguments: -4007, Not supported feature or function`。

- 三种文本字符串：clob、nclob、long。
 - 三种二进制字符串：blob、bfile、long raw。
 - 伪列：rowid、urowid。
 - PL 数据类型如嵌套表、xmltype、varray 等。

#### 说明

- OceanBase 数据库 Oracle 模式支持的大对象 LOB 类型有：`clob`、`blob`、`json`，暂不支持 `text`、`geometry` 类型
 - OceanBase 数据库 MySQL 模式支持的大对象 LOB 类型有：`text`（分为 `tinytext`、`text`、`mediumtext`、`longtext`）、`blob`（分为 `tinyblob`、`blob`、`mediumblob`、`longblob`）、`json`、`geometry`，暂不支持 `clob` 类型

## 问题的风险及影响

通过 DBLink 读写大 LOB 字段的表数据失败。

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 MySQL 租户无影响，对于 Oracle 租户有影响。

## 适用版本

OceanBase 数据库 V3.2.3（oceanbase-3.2.3.0-20220418212020） 及之后的版本。

## 解决方法

避免通过 DBLink 来直接访问 OceanBase 数据库 Oracle 模式或原生 Oracle 的上述数据类型。

Previous

[专有云 tunnel 打洞方式放开 2881 端口，命令行登录 OBServer 报错 ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11 的原因和解决方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000003049736)

Next

[断链报错 "Read timed out" 的问题排查](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000933519) ![有帮助](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) 咨询热线
