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 APRIL 09, 2020

Applies to:

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

Symptoms

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

BEGIN DBMS_STATS.GATHER_TABLE_STATS(ownname=>'SAPPSE', tabname=>'/SDF/CMO_ERR_LOG',
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.

Cause

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
Symptoms
Cause
Solution


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