I get .dmp files every so often that I need to load in a database. Some of them are created with datapump and some with exp. Is there a simple way to tell them apart that I could put in a script?
Asked
Active
Viewed 529 times
2
-
I opened two files and found the exp file's first two bytes were 0x03 and 0x00. The datapump's first two bytes were 0x03 and 0x01. Does anyone else see something different? – Jon Strayer Jan 20 '12 at 14:34
2 Answers
2
Get an example of each and look at them in a hex editor such as HxD. Each type probably has header or something else at the start of the file that identifies what it is. Open the file and check for which it is.

Kurt
- 36
- 3
2
Looks to me like the EXP format file contains the string EXPORT:V in the first "line". I don't see such a string in the data pump file. Use grep to tell the difference.
Another option is to attempt to load using IMP, check the return code, and if it fails (which you should know fairly quickly), try with IMPDP.

DCookie
- 42,630
- 11
- 83
- 92