سؤال

I have an oracle dump file which I assume has been created using the exp command and not the expdp

The dump file is about 4 GB and I would like to import it into my Oracle 11.2 database.

The dump file which was created has the tablespace as "spaceA" but my tablespace is "spaceB"

So I would need to remap the tablespace as well.

I did use impdp commands before and it used to work perfectly fine but guess as I understand impdp could only be used on dump file if it was exported using expdp..

Since I am not very familiar with the process of exporting/importing, I would like to get help with this

هل كانت مفيدة؟

المحلول

If the tablespace is not hardcoded in the dmp file create table statements then you should be able to import without a problem. So my suggestion would be to first try something like the following (for more details: http://docs.oracle.com/cd/E11882_01/server.112/e10701/original_import.htm)

imp user/password@instance file=FILE.dmp log=LOG.log fromuser=DMPSCHEMA touser=NEWSCHEMA

If you get IMP-00017 errors. Then you have to take the longer route. You need to first create the tables and then import with ignore=y.

To first create the tables you need the DDL statements, which you can obtain by running:

imp user/password@instance file=FILE.dmp log=LOG.log full=y indexfile=INDEXFILE.log

The INDEXFILE.log will contain all the create table statements. Find and replace "spaceA" with "spaceB", create the tables, and then run the import with the ignore=y parameter which will ignore table creation errors (since tables already exist) and load data:

imp user/password@instance file=FILE.dmp log=LOG.log fromuser=DMPSCHEMA touser=NEWSCHEMA ignore=y
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top