• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > Oracle 查看imp导出文件中字符集

Oracle 查看imp导出文件中字符集

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了Oracle,查看,imp,导出,文件,字符集,我们,exp等相关知识,希望本文的分享对您有所帮助

我们在exp导入的时候,经常会有警告字符不一致的问题。下面来看看在imp/exp导入导出的时候,nls_lang这个参数到底应该怎么来配置。 Oracle推荐在执行exp的时候nls_lang配置与database nls_character一致,这样不会出现字符转换的问题,能提高exp的效率。查看d

我们在exp导入的时候,经常会有警告字符不一致的问题。下面来看看在imp/exp导入导出的时候,nls_lang这个参数到底应该怎么来配置。

Oracle推荐在执行exp的时候nls_lang配置与database nls_character一致,这样不会出现字符转换的问题,能提高exp的效率。查看database nls_character

SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';

VALUE
------------------------------
ZHS16GBK
我们这里只做查看已经导出的exp文件的字符集。

$ echo $NLS_LANG

$
$ exp userid=scott/Oracle file='/tmp/scott.dmp' log='/tmp/scott.log'

Export: Release 11.2.0.3.0 - Production on Thu Aug 30 13:07:22 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SCOTT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SCOTT
About to export SCOTT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SCOTT's tables via Conventional Path ...
. . exporting table BONUS 0 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
. . exporting table SALGRADE 5 rows exported
EXP-00091: Exporting questionable statistics.
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.
从上面提示可以看到database的字符集是ZHS16GBK,而我的client的nls_lang中的client字符集是US7ASCII。

下面是查看已经导出的/tmp/scott.dmp文件的字符集

$ imp userid=scott/Oracle file='/tmp/scott.dmp' show=yes

Import: Release 11.2.0.3.0 - Production on Thu Aug 30 13:07:58 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)

import done这行表示的client 的字符集是US7ASCII,导入导出端的字符集是相同的。

import server这行表示导入的数据库的字符集是ZHS16GBK,由于字符集不一样,所以会出现字符集的转换。

当exp client与imp client不一样的时候会出现下面的提示:

$ export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
$ echo $NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
$ imp userid=scott/Oracle file='/tmp/scott.dmp' show=yes

Import: Release 11.2.0.3.0 - Production on Thu Aug 30 13:11:53 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)

export client这行表示导出client的字符集是US7ASCII。

更详细的见官方文档:NLS considerations in Import/Export - Frequently Asked Questions [ID 227332.1]
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 浅析drop user与delete from mysql.user的区别
  • mysql prompt的用法详解
  • 如何使用索引提高查询速度
  • 深入mysql创建自定义函数与存储过程的详解
  • JDBC数据库的使用操作总结
  • MySQL查询优化:LIMIT 1避免全表扫描提高查询效率
  • MySQL与Oracle的语法区别详细对比
  • 有关mysql中ROW_COUNT()的小例子
  • MySQL 百万级分页优化(Mysql千万级快速分页)
  • 从创建数据库到存储过程与用户自定义函数的小感

相关文章

  • 2018-12-05MSSQL经典语句
  • 2018-12-05mYsql日期和时间函数不求人
  • 2018-12-05MySQL最新版5.7.12安装教程(windows)_MySQL
  • 2018-12-05Mysql 5.7.18 解压版安装及启动实例方法
  • 2018-12-05mysql缓冲和缓存设置详解
  • 2018-12-05全国省市区县最全最新数据表(数据来源谷歌)
  • 2017-05-11mysql服务无法启动报错误1067解决方法(mysql启动错误1067 )
  • 2018-12-05MySQL汇总和分组数据
  • 2017-05-11cmd中MySQL中文数据乱码问题解决方法
  • 2017-05-11MySQL启动1053错误解决方法

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • mysql嵌套查询和联表查询优化方法
    • MYSQL中的锁介绍
    • MAC下MySQL初始密码忘记生物解决办法分享(图)
    • Oracle关于时间/日期的操作
    • mysql执行时间为负数的原因分析
    • mysql进阶(十)不靠谱的FLOAT数据类型
    • Mysql LONGTEXT 类型存储大文件(二进制也可以) (修改+调试+整理)
    • CentOS Linux更改MySQL数据库目录位置具体操作
    • 推荐10篇mysql_error使用实例
    • mysql5.7.18在Centos7.3下如何安装并修改初始密码的方法详解

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有