How To Find Out Whether AN Oracle Export File is Binary or Flat File in Unix?

Greetings,

I have an oracle export file that has given me an error that indicates that is was restored as a flat file. The SA is unable to verify his methods of backing up my oracle export file. How can I tell from the unix environment whether this file is a binary or flat file? Is there a unix command that will show me whether it's a binary file or a flat file?
Omega002Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
My unix is old and rusty but I don't remember a way that is 100% but you can try cat -v

http://bytes.com/topic/php/answers/529876-how-check-if-uploaded-file-binary-ascii

That said:  An Oracle export is binary 100% of the time.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
woolmilkporcCommented:
Try
file filename
wmp
0
Omega002Author Commented:
with both commands what am I looking for as the results?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

slightwv (䄆 Netminder) Commented:
cat -v displays non-printable characters so if you get anything back it's likely a binary file.

the file command guesses at a file type based on 'known patterns' not really binary or not.
0
woolmilkporcCommented:
"file" should give you hints whether it's e.g.
"... ASCII text ..."
or
".... executable ..."
or
" ... MP32, Mono ..."
or the like. When you see "ASCII" showing up, it's in almost any case a text file, and not binary.
 
0
uaynebCommented:
as an example /etc/hosts is a text file (flat file), /bin/ls is a binary

suse10sp2db3:/etc # file /bin/ls
/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped

suse10sp2db3:/etc # file /etc/hosts
/etc/hosts: ASCII English text
suse10sp2db3:/etc #
0
DavidPresidentCommented:
cat filename | more

Above will dump it to the screen.  If you see squiggly characters then it is binary.   The more command lets you hit space bar to continue, or just CTRL-C to stop viewing.
0
slightwv (䄆 Netminder) Commented:
'file' is great for what it knows about. The question is about an Oracle export dump file.

Unless things have changed radically in the UNIX world, 'file' doesn't know what those are.

Granted if you want to take the time to figure out a recognizable pattern and properly configure your system you can have 'file oracledumpfile.dmp' return 'This is an Oracle 10g dump file' but not by default.
0
Omega002Author Commented:
Ok this question is for the oracle dba guys. I created this export from oracle database control and I am trying to import from command line. When attempting to import from command line I get the following error?

IMP-00010 not a valid export file, header failed verification
0
woolmilkporcCommented:
OK,

this IMP-00010 can have several causes.

- Which way did you create the file? Must be "exp" or "expdp"!

- Did you transfer the file across the net? If FTP, "binary" transfer is mandatory, "ascii" will corrupt the file.

- Or did you manipulate the file some other way? Compression? Splitting? Joining? All those things will corrupt it.

- Are the versions of the exporting and the importing DB the same?
At least the importing DB's version must be equal to or higher than the exporting DB's version.

wmp

 
0
Omega002Author Commented:
NA
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.