Avatar of José Perez
José Perez
Flag 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

Oracle DatabaseDatabasesEnterprise Software

Avatar of undefined
Last Comment
José Perez

8/22/2022 - Mon
johnsone

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
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
José Perez

ASKER
Can you please tell what commands should I use? (I am an SQL DB Adminsitrator not Oracle)
Tahnks.
José Perez

ASKER
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?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
johnsone

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
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.
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';
C:\app\Administrator\admin\dctm\dpdump\

Open in new window

SOLUTION
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Geert G

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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
José Perez

ASKER
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.