oracle 用户A 下面有N个表,现在要新建用户B,把A下所有的表复制到B中,如何做 ?大虾赐教

解决方案 »

  1.   

    导出再倒入
    导出的时候选择按用户导出表和数据。
    1 导出的数据: 
    一、导出指定用户(方案)的数据: 
    exp system/system owner=username file=c:\gxulib.dmp 
    (如果使用该用户自己导出自己的方案,可以先给该用户赋予导出权限: 
    SQL>grant export full database to username 
    然后用该用户导出数据 
    exp username/user_passwd onwer=username file=c:\gxulib.dmp) 
    导入: 
    imp system/system fromuser=gxulib touser=gxulib ignore=y file=c:\gxulib.dmp 
      

  2.   

    1.先建立用户B.
    2.导出用户A的数据.exp...
    3.在用户B中导入刚才的备份文件.imp...
      

  3.   

    1.先建立用户B.
    2.导出用户A的数据.exp...
    3.在用户B中导入刚才的备份文件.imp...
      最好用imp userid=system/manager fromuser=A touser=B ignore=y file=expfile.dmp full=y 
    如果表里面有blob字段的话,需要建立和A一样的表空间
      

  4.   

    A导出dmp新建B用户  导入dmp  
    fromuser=A  touser=B
      

  5.   


    只要注意下fromuser和touser就行了,  3楼有个参数很要命,FULL=Y可不能加的哦