Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: imp question

Re: imp question

From: Mark Bole <makbo_at_pacbell.net>
Date: Fri, 11 Feb 2005 15:55:26 GMT
Message-ID: <Oz4Pd.3928$aW6.3073@newssvr22.news.prodigy.net>


Anurag Varma wrote:

> "Malcolm Dew-Jones" <yf110_at_vtn1.victoria.tc.ca> wrote in message news:420bff35_at_news.victoria.tc.ca...
> 

>>I have exp'd several tables using the exp defaults, which appears to
>>include GRANTS INDEXES ROWS CONSTRAINTS TRIGGERS.
>>
>>Now I am about to imp those table just to check I can do that before doing
>>other things.
>>
>>I understand perfectly well that imp fails if the data still exists in the
>>table (primary key constraint). To reload the data I must "empty" or
>>"replace" the table being reloaded, and imp appears to provide the DESTROY
>>option to do that.
>>
>>My question(s) is this. If I use "imp DESTROY=Y ..." then can the import
>>have side effects involving other tables due to relations between other
>>tables and the ones I am restoring?
>>
>>In the first test I am restoring the original data and nothing has been
>>altered in the database.
>>
>>Later, lets assume that some other table had been altered without my
>>knowledge, and that table had a relation with one I am restoring. What
>>would happen when I try to import the original data? Would the entire imp
>>fail, or just certain rows fail, or what?
>>
>>thanks for any feedback.
>>
> 
> 
> If you type
> 
> imp help=y
> 
> You would find the following explanation of the destroy clause:
> 
> DESTROY                overwrite tablespace data file (N)
> 
> 
> ... proceed with caution!. RTFM
> 
> Anurag
> 
> 

Actually, IMP of a table will fail if the target table exists, whether or not it has any rows, unless you use the IGNORE=Y option. Existing constraints will be enforced during an import unless disabled first.

IMP can be a complex, multi-step process. Some problems cause it to abort, others may lead to a "successful with warnings" status.

Since you are testing, you should be able to answer your own questions.

-Mark Bole Received on Fri Feb 11 2005 - 09:55:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US