---
title: 使用 nlssort 报错：-4077, 不支持的功能-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于使用 nlssort 报错：-4077, 不支持的功能相关的常见问题和使用技巧，帮助您快速解决使用 nlssort 报错：-4077, 不支持的功能的难题。
---
切换语言

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

划线反馈

# 使用 nlssort 报错：-4077, 不支持的功能

更新时间：2026-05-19 08:21

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

## 问题现象

OceanBase 数据库 V3.2.3 版本开始支持 NLSSORT 函数，用于按照指定的字符排序规则进行排序。未打开集群配置项 `_enable_static_typing_engine` 使用 NLSSORT 时报以下错误。

```shell
ORA-00600: internal error code, arguments: -4077, Not implemented feature

```

示例如下。

1. 查询集群配置项 `_enable_static_typing_engine`。

   ```shell
   obclient [oceanbase]> select * from __all_virtual_sys_parameter_stat where name='_enable_static_typing_engine';

   ```

   输出结果如下。

   ```shell
   +-------+----------+---------------+----------+------------------------------+-----------+-------+--------------+-------------------------------------------------------------------+-------------+----------+---------------+---------+---------+-------------------+
   | zone  | svr_type | svr_ip        | svr_port | name                         | data_type | value | value_strict | info                                                              | need_reboot | section  | visible_level | scope   | source  | edit_level        |
   +-------+----------+---------------+----------+------------------------------+-----------+-------+--------------+-------------------------------------------------------------------+-------------+----------+---------------+---------+---------+-------------------+
   | zone1 | observer | xx.xx.xx.xx   |     2882 | _enable_static_typing_engine | NULL      | False  | NULL        | specifies whether static typing sql execution engine is activated |        NULL | OBSERVER | NULL          | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
   +-------+----------+---------------+----------+------------------------------+-----------+-------+--------------+-------------------------------------------------------------------+-------------+----------+---------------+---------+---------+-------------------+
     1 row in set (0.002 sec)

   ```
 2. 创建测试表。

   ```shell
   obclient [SYS]> create table test(id number primary key,col1 varchar2(10),col2 varchar(10),col3 varchar2(10),col4 varchar(10)) partition by hash(id) partitions 6;
   Query OK, 0 rows affected (0.069 sec)

   ```
 3. 插入测试数据。

   ```shell
   obclient [SYS]> begin
       for i in 1..1000
       loop
       insert into test values(i ,'AAA'||i  ,'BBB'||i ,'CCC'||i,'DDD'||i) ;
       end loop;
       end;
       /
   Query OK, 1 row affected (0.109 sec)

   ```
 4. 使用 NLSSORT 函数。

   ```shell
   obclient [SYS]> SELECT * FROM test order by  nlssort(id, 'NLS_SORT=SCHINESE_PINYIN_M');
   ORA-00600: internal error code, arguments: -4077, Not implemented feature

   ```

## 问题原因

没有打开集群配置项 `_enable_static_typing_engine`。

为了避免 SQL 执行中对常量表达式的重复计算，OceanBase 数据库设计了新的 SQL 引擎并由配置项 `_enable_static_typing_engine` 控制新老引擎的使用。NLSSORT 函数需要使用新的 SQL 引擎。

## 适用版本

OceanBase V3.2.3 (oceanbase-3.2.3.0-20220418212020)、V3.2.4 (oceanbase-3.2.4.0-100000072022102819) 版本。

## 解决方法

开启 SQL 新引擎。

```shell
obclient [oceanbase]> ALTER SYSTEM SET _enable_static_typing_engine = True;
Query OK, 0 rows affected (0.054 sec)

```

上一篇

[MYSQL 模式中 GROUP BY 不包含所有的非聚合字段时的注意事项](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002830431)

下一篇

[字符串中含有非可见的 ASCII 字符时，LPAD 结果与 Oracle 不兼容](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000045545) ![有帮助](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) 咨询热线
