.dmp 文件的实际类型
我经常收到 .dmp 文件,需要将其加载到数据库中。其中一些是用 datapump 创建的,一些是用 exp 创建的。有没有一种简单的方法可以将它们区分开来,我可以将其放入脚本中?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
获取每个示例并在十六进制编辑器(例如 HxD)中查看它们。每种类型可能在文件开头都有标头或其他内容来标识它是什么。打开该文件并检查它是什么。
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.
在我看来,EXP 格式文件的第一“行”中包含字符串 EXPORT:V。我在数据泵文件中没有看到这样的字符串。使用 grep 来区分。
另一种选择是尝试使用 IMP 加载,检查返回代码,如果失败(您应该很快就会知道),请尝试使用 IMPDP。
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.