Oracle 23.26SQLLab-verified · 2026-11-29

ORA-00972: identifier is too long (exceeds the maximum length of 128 bytes)

A name (table, column, alias, or anything in double quotes) is longer than 128 bytes.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-00972: The identifier The system...rk before ... exceeds the maximum length of 128 bytes.

What changed in 26ai error messages →

Jump to a cause

  1. 01A text value written in double quotes
  2. 02A Korean/Japanese column alias over 128 bytes
  3. 03A generated table name longer than 128 bytes

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim

Since Oracle 12.2 an identifier can be up to 128 bytes. In 23ai the message no longer just says identifier is too long. It shows the start and end of the offending name and says it exceeds the maximum length of 128 bytes, which makes it much easier to find.

The limit is in bytes. A name of 67 characters can already be too long if it contains Korean or Japanese. And anything in double quotes is treated as an identifier, which is where this error most often comes from.

01A text value written in double quotes

INSERT INTO notices VALUES (1, "The system will be unavailable ... before then.") failed with ORA-00972: The identifier The system...rk before ... exceeds the maximum length of 128 bytes. Oracle read the double-quoted text as a column name, and at 133 characters it was too long for a name.

With single quotes the same text is a string, and the INSERT created 1 row.

Setup
Setuprun as lab_a
CREATE TABLE notices (id NUMBER PRIMARY KEY, msg VARCHAR2(300));
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO notices VALUES (1, "The system will be unavailable from 22:00 to 24:00 on Saturday for scheduled database maintenance. Please save your work before then.");
✕ ERROR
INSERT INTO notices VALUES (1, "The system will be unavailable from 22:00 to 24:00 on Saturday for scheduled database maintenance. Please save your work before then.")
                               *
ERROR at line 1:
ORA-00972: The identifier The system...rk before ... exceeds the maximum length of 128 bytes.
Help: https://docs.oracle.com/error-help/db/ora-00972/
Checkrun as lab_a
SELECT LENGTH('The system will be unavailable from 22:00 to 24:00 on Saturday for scheduled database maintenance. Please save your work before then.') AS len FROM dual;
OUTPUT
       LEN
----------
       133

1 row selected.

Strings in Oracle always use single quotes. A shorter double-quoted text fails with ORA-00904 (invalid identifier) instead.

After the fixrun as lab_a
INSERT INTO notices VALUES (1, 'The system will be unavailable from 22:00 to 24:00 on Saturday for scheduled database maintenance. Please save your work before then.');
✓ SUCCESS
1 row created.

02A Korean/Japanese column alias over 128 bytes

A report query used a long Korean alias in double quotes. The 67-character alias failed with ORA-00972 because LENGTHB showed it was 151 bytes (Hangul takes 3 bytes in AL32UTF8).

A shorter alias, "서울 매출 합계", returned 1500.

Setup
Setuprun as lab_a
CREATE TABLE sales (region VARCHAR2(20), amount NUMBER);
INSERT INTO sales VALUES ('Seoul', 1500);
COMMIT;
OUTPUT
Table created.


1 row created.


Commit complete.
Reproducerun as lab_a
SELECT SUM(amount) AS "2026년 하반기 서울 수도권 지역 영업본부 전체 매출 합계 금액(부가세 포함, 반품 및 할인 차감 후 최종 확정 기준)" FROM sales;
✕ ERROR
SELECT SUM(amount) AS "2026년 하반기 서울 수도권 지역 영업본부 전체 매출 합계 금액(부가세 포함, 반품 및 할인 차감 후 최종 확정 기준)" FROM sales
                      *
ERROR at line 1:
ORA-00972: The identifier 2026년 하반기 ...품 및 할인 차감 ... exceeds the maximum length of 128 bytes. Help:
https://docs.oracle.com/error-help/db/ora-00972/
Checkrun as lab_a
SELECT LENGTHB('2026년 하반기 서울 수도권 지역 영업본부 전체 매출 합계 금액(부가세 포함, 반품 및 할인 차감 후 최종 확정 기준)') AS bytes, LENGTH('2026년 하반기 서울 수도권 지역 영업본부 전체 매출 합계 금액(부가세 포함, 반품 및 할인 차감 후 최종 확정 기준)') AS chars FROM dual;
OUTPUT
     BYTES      CHARS
---------- ----------
       151         67

1 row selected.

Check with LENGTHB, not LENGTH. The character count (67) looked fine, the byte count (151) did not.

After the fixrun as lab_a
SELECT SUM(amount) AS "서울 매출 합계" FROM sales;
✓ SUCCESS
서울 매출 합계
--------------
          1500

1 row selected.

03A generated table name longer than 128 bytes

A CREATE TABLE with a name built by joining words (149 characters, checked with LENGTH) failed with ORA-00972, and the message showed CUSTOMER_O...AIL_DETAIL....

The table was created with the short name cust_order_hist_arch_detail.

Reproducerun as lab_a
CREATE TABLE customer_order_history_archive_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail (id NUMBER PRIMARY KEY);
✕ ERROR
CREATE TABLE customer_order_history_archive_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail (id NUMBER PRIMARY KEY)
             *
ERROR at line 1:
ORA-00972: The identifier CUSTOMER_O...AIL_DETAIL... exceeds the maximum length of 128 bytes.
Help: https://docs.oracle.com/error-help/db/ora-00972/
Checkrun as lab_a
SELECT LENGTH('customer_order_history_archive_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail_detail') AS name_length FROM dual;
OUTPUT
NAME_LENGTH
-----------
        149

1 row selected.
After the fixrun as lab_a
CREATE TABLE cust_order_hist_arch_detail (id NUMBER PRIMARY KEY);
✓ SUCCESS
Table created.

FAQ

What is the maximum identifier length in Oracle?

128 bytes since 12.2 (30 bytes before). The 23ai message itself says exceeds the maximum length of 128 bytes.

Why do I get ORA-00972 in an INSERT with a text value?

The text is in double quotes, so Oracle treats it as a name. In the test, switching to single quotes fixed the INSERT.

My alias is under 128 characters. Why ORA-00972?

The limit is in bytes. In the test, a 67-character Korean alias was 151 bytes by LENGTHB.

How do I find which name is too long?

In 23ai the message shows the first and last part of the name, for example CUSTOMER_O...AIL_DETAIL..., and SQL*Plus marks its position with *.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0