Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_stats.import_table_stats is not working in 11g

user535789Apr 20 2013 — edited Apr 21 2013
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2013
Added on Apr 20 2013
2 comments
1,108 views