Skip to content
August 13, 2014 / doganay

HOW TO MOVE TABLE STATISTICS

1)
--on local db
exec dbms_stats.create_stat_table('DOGANAY','STAT_TABLE1');

2)
--collecting stats in stat table
--on local db
begin
dbms_stats.export_table_stats(
ownname => 'DOGANAY',
tabname => 'TABLE1',
stattab => 'STAT_TABLE1'
);
end;
/

3)
# on local server
exp file=exp_STAT_TABLE1.dmp tables=doganay.stat_table1

4)
Transfer exp_STAT_TABLE1.dmp to remote server

5)
# on remote server
imp file=exp_STAT_TABLE1.dmp fromuser=doganay touser=doganay

6)
--on remote db
exec dbms_stats.IMPORT_TABLE_STATS('ARADMIN','T2108',STATTAB => 'STAT_T2108' , NO_INVALIDATE => 'FALSE');
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: