Re: imp: more problems/questions

From: Joanne Woytek <joanne_at_eosdev1.gsfc.nasa.gov>
Date: 1995/06/07
Message-ID: <3r4kad$24c_at_post.gsfc.nasa.gov>#1/1


In article <3r46ku$rfv_at_ixnews3.ix.netcom.com>, chuckh_at_ix.netcom.com (Chuck Hamilton) writes:
|> Last night I used imp to import a table with the following parameter
|> file...
|>
|> buffer=65536
|> file=/hold/expdat.dmp
|> tables=(claims_line_items)
|> commit=y
|> log=cha.log
|> indexes=n
|> # indexfile=cha.sql
|>
|> This table did not exist before the import (I know this because I
|> dropped it before starting). Notice that there's a line that says
|> "indexes = n". When I came in this morning to build the primary key
|> index for that file, I discovered that the imp program had already
|> built it. Why since I specified no indexes?
|> --
|>

Good - finally I get to try to answer one instead of asking!

When you drop a table if you do not include "CASCADE CONSTRAINTS" or alternatively, do an alter table drop constraint xxx for each constraint, that constraint remains around. So the imp program did not build the primary key, it was never dropped. The key here is that indexes are dropped with a table, but constraints, such as primary key, must be dropped explicitely.

Hope I have this right, and that it helps.

Joanne Woytek
Code 902.2
joanne_at_eosdev1.gsfc.nasa.gov Received on Wed Jun 07 1995 - 00:00:00 CEST

Original text of this message