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!

can i exclude statistics & indexes both at a time

user11153253Nov 4 2014 — edited Nov 5 2014

Hi folks,

i have to do big table re- organization , so my question is can i exclude statistics & indexes at same time

i am planing this activity as  below , please advise me  if i am wrong.

1)create table xx_031114 as select * from xx;   ( this is as precautionary steps)

2)export the table xxx using its owner yy user

expdp yy/passwd@tnsnames DIRECTORY=export  DUMPFILE=xx.dmp tables=xx  LOGFILE=xx.log

3)Truncate the table or Drop the table

SQL>truncate table xx;

SQL>drop table xx;

4) import the table with Metadata without statistics & indexes like below

impdp  yy/passwd@tnsnames DIRECTORY=export DUMPFILE=xx.dmp TABLES=xx exclude=statistics,indexes CONTENT=METADATA_ONLY  LOGFILE=imp_031114.log   (import only meta data without statistic & indexes)


Question1: can i exclude both statistics & Indexes at a time?

impdp yy/passwd@tnsnames DIRECTORY=export DUMPFILE=xx.dmp TABLES=xx CONTENT=DATA_ONLY exclude=indexes LOGFILE=imp_dataonly_031114.log   (import data only without indexes)

impdp  yy/passwd@tnsnames DIRECTORY=export DUMPFILE=xx.dmp  TABLES=xx include=indexes  (import indexes only) 

Question 2 : can i import indexes only like  above? 

thanks & Regards.

younus

This post has been answered by Pravin Takpire on Nov 4 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2014
Added on Nov 4 2014
4 comments
908 views