dbms_stats.import_table_stats is not working in 11g
Hi Experts,
We are in the middle of production purge of huge tables for a bank. I took the stats in one table beofre purge (delete data, creating new table, rename prod table to another table name and finally rename new table to original one). I took the export of stats before all these activities and when as a final setp I am trying to import the stats , its not impoting it. I stuck, Please help me ASAP.
Below are the steps:
exec dbms_stats.create_stat_table ( ownname => 'PROD', stattab => 'WH_COMMON_TRADES_D_STAT' );
exec dbms_stats.export_table_stats ( ownname => 'PROD' , stattab => 'WH_COMMON_TRADES_D_STAT', tabname => 'WH_COM_TRADES_D', statid => 'stats03252011');
exec dbms_stats.import_table_stats ( ownname => 'PROD' , tabname => 'WH_COM_TRADES_D', stattab => 'WH_COMMON_TRADES_D_STAT')
Is not throwing any error ans prompting the message that pl/sql is sucessfully executed. But when I am trying to see the stats on table I am not able to see it:
select num_rows from dba_tables where table_name='WH_COM_TRADES_D'
Can someone please help me? Oracle version is 11g. I can see 6442 rows in stat table WH_COMMON_TRADES_D_STAT
Please please help me.
Regds,
Amit.