I'm trying to import a .dmp file which is exported from Oracle (different environment).
In SQL command line, I have tried the following
Open run SQl Command Line
Step 1: Login as system user
SQL> connect system/admin
Step 2 : SQL> CREATE USER UserName IDENTIFIED BY Password;
Step 3 : SQL> grant dba to bala;
Step 4 : SQL> GRANT UNLIMITED TABLESPACE TO bala;
Step 5:
SQL> CREATE BIGFILE TABLESPACE TSD_UserName
DATAFILE 'tbs_perm_03.dat'
SIZE 8G
AUTOEXTEND ON;
And finally in windows, Opened cmd.exe
Step 6: C:\> imp bala/admin@localhost file=D:\abc\xyz.dmp log=D:\abc\abc_1.log full=y;
After a while, the terminal window gives me some error message like this
Note: I have also tried importing it in SQL developer and getting error messages
答案 0 :(得分:0)
You might want to use the parameters "FROMUSER" and "TOUSER", so that IMP knows, where to place the imported data. If the data belonged to a differnt user in the db it was exported from, you need at least to specify the new owner of the data. If there is data from multiple users in the .exp file, you also need to specify, which user's data you want to import.
Maybe you want to have a look at this: http://www.orafaq.com/wiki/Import_Export_FAQ
FULL=Y might work, if all required users are available in the new db. I'd probably create the user/schemas "STORES", "SALES" etc. before the next try. Usually it should be done during full import, BUT I had similar experiences years ago. I edited the dump file and copied all the "CREATE USER/SCHEMA/TABLESPSACE" statements into the comand line window, executed them and then the import worked fine.
btw: if you want to store all imported objects in the new tablespace, FULL=Y won't do, exept all of them are already configured to use it as default tablespace in your dump file.