Page 1 of 1

Gather Schema Statistics invalid column name or duplicate columns

Posted: Thu Nov 17, 2016 6:49 am
by admin
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
In GATHER_SCHEMA_STATS , schema_name= AP percent= 20 degree = 8 internal_flag= NOBACKUP
Error #1: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JE_FR_DAS_010***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #2: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JE_FR_DAS_010_NEW***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #3: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JG_ZZ_SYS_FORMATS_ALL_B***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+

Solution:

create table FND_HISTOGRAM_COLS_17nov16 as select * from FND_HISTOGRAM_COLS

select table_name, column_name, count(*)
from FND_HISTOGRAM_COLS
group by table_name, column_name
having count(*) > 1

Perform follwing for each of the above errors in log file,

delete from FND_HISTOGRAM_COLS
where table_name = 'JG_ZZ_SYS_FORMATS_ALL_B'
and column_name = 'JGZZ_EFT_TYPE'
and rownum=1;

delete from FND_HISTOGRAM_COLS
where (table_name, column_name) in
(
select hc.table_name, hc.column_name
from FND_HISTOGRAM_COLS hc , dba_tab_columns tc
where hc.table_name ='JG_ZZ_SYS_FORMATS_ALL_B'
and hc.table_name= tc.table_name (+)
and hc.column_name = tc.column_name (+)
and tc.column_name is null
);

Commit;

Now run the Gather Schema Statistics