使用正确的字符集导入/导出 oracle 方案
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21283164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Import / export oracle scheme with correct character set
提问by Matthias Max
I have exported a scheme successfully. On the import however the log says that the character sets don't match. The strange thing is that on the server the export was done the character set is the same as on the target database.
我已经成功导出了一个方案。然而,在导入时日志说字符集不匹配。奇怪的是,在服务器上完成导出的字符集与目标数据库上的字符集相同。
This is from the source:
这是从源头:
SQL> select * from v$NLS_PARAMETERS
2 ;
**NLS_CHARACTERSET
WE8MSWIN1252**
**NLS_NCHAR_CHARACTERSET
AL16UTF16**
And this is from the log of the import:
这是来自导入的日志:
Importvorgang mit Zeichensatz WE8MSWIN1252 und Zeichensatz AL16UTF16 NCHAR durchgeführt
Export-Client verwendet Zeichensatz US7ASCII (m?gliche Zeichensatzkonvertierung)
Why is the dump recognized as US7ASCII set? The source and target both are non-US machines.
为什么转储被识别为 US7ASCII 集?源和目标都是非美国机器。
Thank you
谢谢
回答by pahariayogi
Yes, Looks like issue with char set of client session. Set it to globally supported and recommended UTF8 format.
是的,看起来像客户端会话字符集的问题。将其设置为全球支持和推荐的 UTF8 格式。
Pls take the export again and try importing. (Do the following before export):
请再次导出并尝试导入。(在导出前执行以下操作):
In Windows
set NLS_LANG=AMERICAN_AMERICA.UTF8
In Unix
export NLS_LANG=AMERICAN_AMERICA.UTF8
These days DB char set is also recommended to be 'AL32UTF8'.
现在还推荐 DB 字符集为 'AL32UTF8'。