I know how to use the “imp” to import the .dmp data . But I wonder if I have to create the tablespace first,for example?
Other people have a oracle database instance,and he create a user “sa_one” whose defaule tablespace is “tabspace_one”,then he create some tables under this tablespace.
Then he export the objects under the user “sa_one” to a xx.dmp.
Now,in my machine,I have my own database instance,and I create a user “sa_two” whose defaule tablespace is “tabspace_two”.
Now if I want import the xx.dmp to the user “sa_two”. I use the cmd:
imp fromuser=sa_one touser=sa_two file=xx.dmp
But I wonder if I have to create a tablespace “tabspace_one” in my database instace?
hguser,
If you do what you said:
Then the data will be imported into the table space that the ‘sa_two’ schema has set to as a default table space. Although I must admit – I can’t find the oracle documentation that explicitly says this it true, but I did find this oracle wiki:
http://wiki.oracle.com/thread/1284972/EXP+%26+IMP+only+restores+to+same+tablespace(s)
Alternatively, you could just use EXPDP and IMPDP and issue remap_tablespace for the import.
All else, this is what happens when you try to import to a table space that does not exist: