确定现有 Oracle 数据库转储文件的 NLS_LANG 设置
另一支团队向我们提供了一份转储文件,该团队在今年剩下的时间里都离开了。当我们尝试将转储导入到我们自己的数据库中时,我们收到以下错误:
IMP-00038: Could not convert to environment character set's handle
经过一些研究,我们推测源计算机和本地计算机的 NLS_LANG 设置不匹配。我们目前没有任何方法来检查源计算机上 NLS_LANG 的值是什么。
那么,我们手里只有一个转储文件,有没有办法找出导出时使用的 NLS_LANG 值呢?从表面上看,我们应该能够在运行导入客户端(imp)之前覆盖 NLS_LANG 环境变量。
另一件事是,转储是从 11g 实例完成的,而我们的 imp 版本是 10。我读到 imp 不向前兼容。这可能是这里的问题(而不是 NLS_LANG 不匹配)吗?
We were handed a dump file by another team who are gone away for the rest of the year. When we try to import the dump into our own database, we get the following error:
IMP-00038: Could not convert to environment character set's handle
Upon some research, our speculation is that we have a mismatch between the NLS_LANG setting of the source machine and our local machine. We currently don't have any means to check what the value of NLS_LANG is on the source machine.
So, having just a dump file in our hands, is there a way to figure out the NLS_LANG value with which the export was done? From the looks of it, we should be able to override the NLS_LANG environment variable before running the import client (imp).
Another thing is, the dump was done from an 11g instance and our imp version is 10. I read that imp is not forward compatible. Could this be the issue here (instead of the NLS_LANG mismatch)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Ates,尝试 impdp - 有时这会有所帮助:-)
Ates, try impdp - sometimes that could help :-)
unix 上最简单的方法是:
版本 exp/imp 是一个问题:
我通常使用V10导出程序并使其连接到V11数据库。
确保 dev10 的 oracle_home 中的 tnsnames.ora 中有 dev11 的别名。
easiest way on unix is:
Version exp/imp is a problem:
I usually use the V10 export program and make it connect to the V11 database.
Make sure you have a alias for dev11 in your tnsnames.ora in dev10's oracle_home.
尽管该文件是二进制乱码,但仍有一些人类可读的文本摘录。我在那里看到了以下字符串,我认为这回答了我的问题:
Even though the file is a binary garble, there are some human-readable text excerpts. I saw the following strings in there, and I think this answers my question:
A:你是对的;您无法导入使用给定 Oracle 客户端创建的转储文件,因为目标 Oracle 数据库的 Oracle 客户端较旧。
虽然不建议,但您可以使用较旧 Oracle 客户端(即 10g)导出较新源 Oracle 数据库(即 10g+),因为您正在使用相同的 Oracle 客户端版本导入旧目标 Oracle 数据库(即 10g)。
假设:源数据库的 Oracle 客户端版本与目标 Oracle 数据库版本相同或更高。请注意,混合工具Datapump (11g) 和imp (-10g) 导入实用程序不起作用。
有趣的链接使用不同的发行版和版本导出
A: You 're right; You cannot import a dump file created with a given Oracle Client, since the Oracle Client of your Target Oracle Database is older.
Although it is not recommended, you can export a newer Source Oracle Database (i.e. 10g+) with an older Oracle Client (i.e. 10g), since you are using the same Oracle Client version to import into your older Target oracle Database (i.e. 10g).
Assumption: The Oracle Client version of your Source Database is the same -or newer- as your Target Oracle Database version. Note that mixing tools Datapump (11g) and imp (-10g) import utility does not work.
Interessant link Using Different Releases and Versions of Export
也许它是使用
expdp
导出的......尝试impdp
....这就是我在搜索谷歌时看到的,并且它确实对我解决了同样的问题。Maybe it was exported using
expdp
....tryimpdp
....that is what I saw when searching google, and truly it worked for me for this same issue.