You can use destroy parameter when you use imp!
Default: N
Specifies whether or not the existing data files making up the database should be
reused. That is, specifying DESTROY=Y causes Import to include the REUSE option
in the datafile clause of the CREATE TABLESPACE command, which causes Import
to reuse the original database’s data files after deleting their contents.
Note that the export file contains the data file names used in each tablespace. If you
specify DESTROY=Y and attempt to create a second database on the same machine
(for testing or other purposes), the Import utility will overwrite the first database’s
data files when it creates the tablespace. In this situation you should use the default,
DESTROY=N, so that an error occurs if the data files already exist when the
tablespace is created. Also, when you need to import into the original database, you
will need to specify IGNORE=Y to add to the existing data files without replacing
them.
Caution: If data files are stored on a raw device, DESTROY=N does not prevent files
from being overwritten.
|