您的位置:首页
数据导入/导出
2013-05-17 15:39
239 查看
一、导出:
有时需要统一字符集:
查下系统的字符集:
在客户端统一:
export LANG=zh_CN.GBK
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
单表导入:exp scott/tiger@test buffer=64000 file=/home/oracle/fd.dmp tables=table1
多表导入:
1)exp scott/tiger@test buffer=64000 file=/home/oracle/zw.dmp tables="(table1,table2,table3,table4)"
2)exp scott/tiger@test buffer=64000 file=/home/oracle/zw.dmp tables=table1,table2,table3,table4;
注:可以加log=/home/oracle/user1.log
二、导入:
单表导入:imp scott/tiger@test file=/home/oracle/fd.dmp tables=table1
多表导入:imp scott/tiger@test file=/home/oracle/hljjghd.dmp tables="(table1,table2,table3,table4)"
三、可能会遇到的问题:
错误一:
exp test/test file=test.dmp wner=test log=exp.log
出错
EXP-00056: Oracle error 29275 encountered
ORA-29275: partial multibyte character
EXP-00000: Export terminated unsuccessfully
原因:字符集不一致
oracle@MDSWEBDB01:>sqlplus/ as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Aug 29 15:35:12 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select value from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET';
VALUE
--------------------------------------------------------------------------------
AL32UTF8
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@MDSWEBDB01:>echo$NLS_LANG
AMERICAN_AMERICA.UTF8
解决方法:
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
再继续exp
错误二:ORA-12533:
TNS:illegal ADDRESS parameters
原因: 在tnsnames.ora 文件的ADDRESS 节指定不 正确。
措施:根据ADDRESS语法进行改正。 http://blog.csdn.net/xiaomai469933891/article/details/5387227
有时需要统一字符集:
查下系统的字符集:
SQL> select userenv('language') from dual; USERENV('LANGUAGE') ----------------------------- AMERICAN_AMERICA.ZHS16GBK
在客户端统一:
export LANG=zh_CN.GBK
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
单表导入:exp scott/tiger@test buffer=64000 file=/home/oracle/fd.dmp tables=table1
多表导入:
1)exp scott/tiger@test buffer=64000 file=/home/oracle/zw.dmp tables="(table1,table2,table3,table4)"
2)exp scott/tiger@test buffer=64000 file=/home/oracle/zw.dmp tables=table1,table2,table3,table4;
注:可以加log=/home/oracle/user1.log
二、导入:
单表导入:imp scott/tiger@test file=/home/oracle/fd.dmp tables=table1
多表导入:imp scott/tiger@test file=/home/oracle/hljjghd.dmp tables="(table1,table2,table3,table4)"
三、可能会遇到的问题:
错误一:
exp test/test file=test.dmp wner=test log=exp.log
出错
EXP-00056: Oracle error 29275 encountered
ORA-29275: partial multibyte character
EXP-00000: Export terminated unsuccessfully
原因:字符集不一致
oracle@MDSWEBDB01:>sqlplus/ as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Wed Aug 29 15:35:12 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select value from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET';
VALUE
--------------------------------------------------------------------------------
AL32UTF8
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@MDSWEBDB01:>echo$NLS_LANG
AMERICAN_AMERICA.UTF8
解决方法:
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
再继续exp
错误二:ORA-12533:
TNS:illegal ADDRESS parameters
原因: 在tnsnames.ora 文件的ADDRESS 节指定不 正确。
措施:根据ADDRESS语法进行改正。 http://blog.csdn.net/xiaomai469933891/article/details/5387227
相关文章推荐
- PL/SQL 导出数据为Excel ,同时将Excel数据导入
- SQL Server三种导入导出数据方式比较
- 导入excel数据,导出数据到excel
- sql server 数据的导入导出命令
- ADO.Net_案例1(数据导入导出)
- c#操作xml文件与数据库配合进行数据导入导出
- Oracle 的数据导出导入命令:exp、imp
- 怎么样使用Navicat for MySQL 导出mysql中的数据和将sql数据库文件导入到mysql数据库中
- 【EXPDP/IMPDP】ORACLE数据泵导入导出案例(expdp & impdp)
- ASP.NET Excel 2010数据导入与导出
- SQL Server数据库中导入导出数据及结构时主外键关系的处理
- MySQL数据的导出和导入工具:mysqldump
- mysql 导入导出数据
- mysql的数据导入导出的几种方法
- 从oracle导出数据成csv,将csv导入mongodb问题
- 记一次SQL Server2005导入Oracle10G的折腾过程【供多种数据库导入导出数据的C#程序源码参考】
- Mysql 导入导出数据结构及数据
- PLSQL导入/导出数据方法
- 关于利用heidiSQL或者sqlYog导入导出数据库和数据的问题(导出为excel再导入)
- windows 环境下 mysql,命令导入\导出表结构或数据