三个用户:system、scott、wjf;
将scott的emp表和dept表导出到e盘,emp表中的deptno是外键,dept表中的deptno是主键;1、imp userid=system/man@myora1 tables=(emp)  file=e:\emp.dmp
我看视屏说一张表存在主外键关系,不能导入到其他用户,但我试了一下,这个表能导入到system的table中,但deptno已经不是外键,是吧?
2、imp userid=system/man@myora1 tables=(emp)  file=e:\emp.dmp touser=scot
这个可以执行;
3、imp userid=system/man@myora1 tables=(emp)  file=e:\emp.dmp touser=wjf
这个不行,system用户没有权限吗?为什么system能把scott的emp表导入自己的table中,而不能把它导入到wjf的table中?

解决方案 »

  1.   

    而不能把它导入到wjf的table中?你登入的身份userid=system/man换成 WJF空间的用户就可以了
      

  2.   

    1
    导入得加 constraints=y 
    3
    imp userid=system/man@myora1 tables=(emp)  file=e:\emp.dmp fromuser=scott touser=wjf--or
    imp wjf/pass@myora1 tables=(emp)  file=e:\emp.dmp fromuser=scott