数据库环境:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
系统环境:WinXP SP3
1、C:\Documents and Settings\Administrator>exp yinlingyun/yinlingyun@yinlingyun file=d:\sql.txt tables=(person);
运行结果:
Export: Release 10.2.0.1.0 - Production on 星期二 8月 16 00:34:37 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径...
正在导出表 PERSON导出了 2 行
EXP-00011: YINLINGYUN.; 不存在
导出成功终止, 但出现警告。
解决方式:去掉 exp yinlingyun/yinlingyun@yinlingyun file=d:\sql.txt tables=(person); 之后的分号即可。
2、C:\Documents and Settings\Administrator>imp mdsp/mdsp@orcl file=d:\sql.txt
运行结果:
Import: Release 10.2.0.1.0 - Production on 星期二 8月 16 00:43:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
经由常规路径由 EXPORT:V10.02.01 创建的导出文件
警告: 这些对象由 YINLINGYUN 导出, 而不是当前用户
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
正在将 YINLINGYUN 的对象导入到 MDSP
成功终止导入, 没有出现警告。
但是,conn mdsp/mdsp 之后,使用 select table_name from user_tables 时并看不到 person 表(sql.txt 文件是导出的 yinlingyun 用户下的表结构及其记录)。
解决方式:C:\Documents and Settings\Administrator>imp mdsp/mdsp@orcl file=d:\sql.txt fromuser=yinlingyun touser=mdsp 即可。
具体原因有待研究,望大家发表高论,先谢过了~