My Oracle Support Banner

ORA-06502 when running DBMS_STATS.GATHER_TABLE_STATS against a table name with special characters (Doc ID 434025.1)

Last updated on MARCH 03, 2022

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.
This problem can occur on any platform.


NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

In a SAP environment, tables are named with special characters (for instance '/SDF/CMO_ERR_LOG').
Running DBMS_STATS.GATHER_TABLE_STATS against these kind of tables results in this error message

method_opt=>'FOR ALL COLUMNS SIZE 254', degree=>4, cascade=>TRUE); END;

ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.DBMS_STATS", line 10502
ORA-06512: at "SYS.DBMS_STATS", line 10516
ORA-06512: at line 1

For tablenames without special characters, it works fine. But can not change the tablenames.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.