"myhome" <myhome (AT) home (DOT) hk> wrote
Quote:
I have a dmp file for my database SID=test. I have export the database for
user "owner". So do I need to create "test" database and user "owner" before
I import this dmp file??
Moreover, Is there any extra procedure before import dmp file??
thx |
myhome, if you have a valid user export dmp file you can import it
into any valid compatiable version of Oracle with only a couple of
problems:
First, you can generally import an export file made using the same or
an older version of Oracle, but version 9.2 into 7.3 isn't going to
work.
Two, if the object referenced tablespaces exist then Oracle will
create the tables/indexes in them and proceed to import the data
providing the user has quotas. If the referenced object tablespaces
do not exist then the objects will default to the user default
tablespace and Oracle will attempt to create them there.
Depending on tablespace space management option, the object storage
allocation definition, and the export type compress=y (default) vs
compress=n (my recommendation) you could run into storage allocation
problems.
Also there is a bug in certain (in 8.1 at least) where LOB tables that
have storage clauses will fail to allocate if the target tablespace
does not exist (the LOB fails to default). You will need to
preallocate affected tables. You can cut the DDL from an imp run with
show=y and the output redirected into a file.
In the case of a pre-existing user you can run into object privilege
problems.
Three, when running a user import unless the imp will be ran connected
as the user who was exported then you should specify fromuser= touser=
on the import.
It is not hard. See the Utilities manual chapter on imp for syntax
issues and details on the parameters I listed.
HTH -- Mark D Powell --