要将数据导入到其他用户下,在进行imp 时要使用 FROMUSER 和 TOUSER 这两个参数
FROMUSER: 指定对象的原有属主 TOUSER:指定对象的新属主,即要导入的用户 如导入原scott 用户下的dept 表和emp 表到 yang 用户下
1) C:\Documents and Settings\Administrator>expfile=f:\dump\scott.
dmp log=f:\dump\scott.log tables=(emp,dept)Export: Release 11.1.0.6.0 - Production on 星期日 8月 15 22:54:27 2010
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
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径...
. . 正在导出表 EMP导出了 14 行
. . 正在导出表 DEPT导出了 4 行
成功终止导出, 没有出现警告。
在YANG用户下 ,查看导入结果:
SQL> show user
USER 为 "YANG"
SQL> select us