Link to home
Start Free TrialLog in
Avatar of José Perez
José PerezFlag for Chile

asked on

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;

Open in new window


This is the Oracle command I used to import:
imp system/ABCDE FROMUSER=usrSource TOUSER=userTarget file=D:\Temp\bd_pruebas_abcde\BD_FULL_21082015.dmp full=yes

Open in new window

Avatar of johnsone
johnsone
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of José Perez

ASKER

Can you please tell what commands should I use? (I am an SQL DB Adminsitrator not Oracle)
Tahnks.
mmm probably you're perfectly right!
I was checking the logfile for the exported file and it contains:

dumpfile=DATA_PUMP_DIR:DCTM_FULL_21082015.dmp logfile=DATA_PUMP_DIR:DCTM_FULL_21082015.log full=y

Open in new window


Now if you're correct, I just need the commands to import it, can you... please?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>Can you please tell what commands should I use?

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.
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';
C:\app\Administrator\admin\dctm\dpdump\

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you could start by reading the concepts
> to see what's different in architecture between sql and ora
http://docs.oracle.com/cd/E11882_01/server.112/e40540/toc.htm

the 2day dba might also help
http://docs.oracle.com/cd/E11882_01/server.112/e10897/toc.htm

and check the import utility impdp
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1007653

it's a lot of reading to just run an import

as slight indicated, for a local oracle hire, will be a lot faster
Finally the issue was that the Export I received was don using expdp. That was the reason of the error.
Thanks all for your comments and answers.