--imp test/oracle file=e:\tmp.dmp tables=test;
--imp system/oracle file=e:\tmp.dmp tables=test.test;
--imp system/oracle file=e:\tmp.dmp tables=test.test fromuser=system touser=test ;
--imp system/oracle file=e:\tmp.dmp tables=test fromuser=test touser=test ;
----------------------------
创建用户并指定表空间
create user test identified by oracle default tablespace duanxq_ts1 temporary tablespace duanxq_tmp_ts;
grant unlimited tablespace,connect,resource,dba to test;
create table test (xh number(4),mark NUMBER(10));
insert test values(1,11);
insert test values(2,22);
commit;
SQL> select * from test;
XH MARK
---------- ----------
1 11
2 22
####下面开始导出
C:\Users\test>exp system/oracle file=e:\tmp.dmp full=y;
................
. 即将导出 TEST 的表通过常规路径...
. . 正在导出表 TEST导出了 2 行
. 正在导出同义词
. 正在导出视图
. 正在导出引用完整性约束条件
. 正在导出存储过程
. 正在导出运算符
. 正在导出索引类型
. 正在导出位图, 功能性索引和可扩展索引
. 正在导出后期表活动
. 正在导出触发器
. 正在导出实体化视图
. 正在导出快照日志
. 正在导出作业队列
. 正在导出刷新组和子组
. 正在导出维
. 正在导出 post-schema 过程对象和操作
. 正在导出用户历史记录表
. 正在导出默认值和系统审计选项
. 正在导出统计信息
成功终止导出, 没有出现警告。
SQL> conn test/oracle
已连接。
SQL> drop table test;
表已删除。
SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
####报错
C:\Users\test>imp test/oracle file=e:\tmp.dmp tables=test;
Import: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:33:52 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.01.00 创建的导出文件
警告: 这些对象由 SYSTEM 导出, 而不是当前用户
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
IMP-00033: 警告: 在导出文件中未找到表 "TEST;"
成功终止导入, 但出现警告。
C:\Users\test>sqlplus test/oracle
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:34:30 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from test;
select * from test
*
第 1 行出现错误:
ORA-00942: 表或视图不存在
SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断
开
####报错
C:\Users\test>imp system/oracle file=e:\tmp.dmp tables=test;
Import: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:34:40 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.01.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
IMP-00033: 警告: 在导出文件中未找到表 "TEST;"
成功终止导入, 但出现警告。
C:\Users\test>imp system/oracle file=e:\tmp.dmp tables=test.test;
Import: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:34:55 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.01.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
IMP-00029: 无法使用所有者 (test.test;) 限定表名, 请使用 FROMUSER 参数
IMP-00000: 未成功终止导入
####报错
C:\Users\test>imp system/oracle file=e:\tmp.dmp tables=test.test fromuser=system touser=test ;
Import: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:36:16 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.01.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
IMP-00029: 无法使用所有者 (test.test) 限定表名, 请使用 FROMUSER 参数
IMP-00000: 未成功终止导入
####成功
C:\Users\test>imp system/oracle file=e:\tmp.dmp tables=test fromuser=test touser=test ;
Import: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:36:52 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
经由常规路径由 EXPORT:V11.01.00 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 TEST 的对象导入到 TEST
. . 正在导入表 "TEST"导入了 2 行
成功终止导入, 没有出现警告。
C:\Users\test>sqlplus test/oracle
SQL*Plus: Release 11.1.0.6.0 - Production on 星期四 5月 31 16:37:58 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from test;
XH MARK
---------- ----------
1 11
2 22
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24058069/viewspace-731585/
,如需转载,请注明出处,否则将追究法律责任。