Ora-1476 When Collecting Statistics On Empty Table with Granularity = Approx_Global
Last updated on FEBRUARY 02, 2017
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 and later
Information in this document applies to any platform.
ORA-1476 during GATHER_TABLE_STATS with granularity = APPROX_GLOBAL AND PARTITION.
The error occurs only when no rows in the table. If a row is inserted in to the table, then the error no longer occurs.
BEGIN dbms_stats.gather_table_stats ( ownname => 'INFO',tabname => 'T_ARGMNT_STATUS_OCCR_REASON' ,partname =>'P201107', granularity => 'APPROX_GLOBAL AND PARTITION' ,force => true); END;
ERROR at line 1:
ORA-01476: divisor is equal to zero
ORA-06512: at "SYS.DBMS_STATS", line 23154
ORA-06512: at "SYS.DBMS_STATS", line 23205
ORA-06512: at line 1
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms