Oracle 11G: Import fails: not a valid export file, header failed verification
Hi,
I am trying to import an Oracle 11G dmp file but it is failing with the error: "not a valid export file, header failed verification"
I dont know what is wrong, my client provide me a copy of his Oracle 11G Databse dump.
My client have an Oracle 11G database (Unix)
I have an Oracle 11G database (Windows).
Can somebody help me to fix this issue?
Firstly, I created a new user:
create user userTarget identified by PASSWORD123;grant connect, unlimited tablespace, resource to userTarget;
90% of the time when I see this it is because the file was transferred incorrectly. When transferring the file, it was transferred in ASCII mode and not in binary mode. Therefore translations were done on certain characters and the file is not what it was originally.
There is typically an option within the transfer program that was used that specifies the type of transfer. If there is an automatic, do not use it, explicitly set it as a binary transfer.
It really isn't that easy. If you don't know Oracle, it will likely be confusing and problematic. I'm afraid I cannot provide the "run this" command because I don't know your system and requirements.
Log into the destination database as a DBA level user and run the following:
select directory_path from dba_directories where directory_name='DATA_PUMP_DIR';
Put the file in that folder. If it isn't large enough, you'll need to create the directory:
create or replace directory mydir as 'C:\SOME_PATH';
Now the problematic parts:
Do the tablespaces in the source database already exist in the target database?
Do all the users exist?
Do the tables already exist?
etc... you get the idea.
If you don't have this information, just running the import can really mess with things. It will likely attempt to create and tablespace with the data file paths from the source database.
It might just fail because things aren't set up right.
Anyway:
The parameters should be the same as the export parameters with one exception: It looks like you want to change schema names. I think the fromuser and touser from the original imp will also work in datapump but the new parameter is remap_schema.
If the tabpespaces are different, remap_tablespace, etc...
There are examples of these and how to use them in the online documentation and on the web.
The run the impdp with the same parameters as the export.
José Perez
ASKER
I created the user in target database, so the user is new and epmty but it has the same name than in its source database.
I know the client did a full database export.
I have the default tablespaces of the Oracle 11G installation in the 'oradata' folder.
This is the result of the command you suggest:
select directory_path from dba_directories where directory_name='DATA_PUMP_DIR';
There is typically an option within the transfer program that was used that specifies the type of transfer. If there is an automatic, do not use it, explicitly set it as a binary transfer.