当前位置:数据库 > Oracle >>

oracle10.2 dblink impd同库不同用户复制数据

oracle10.2 dblink impd同库不同用户复制数据
 
同库不同用户复制数据
 
1.授权用户导入表权限;
SQL> grant exp_full_database to system;
SQL> commit;

2.创建dblink;
SQL> create public database link db_link1 connect to system identified by sys using 'ORCL';
SQL> commit;

3.导入impd;
[$ORACLE_HOME/bin]$ impdp system/sys logfile=temp.log  schemas=from_user remap_schema=from_user:to_user network_link=db_link1 

4.删除dblink.
SQL> drop public database link;
SQL> commit;

 

 
注:
1.数据库操作用户:system/sys
2.服务名ORCL
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,