同库不同用户复制数据
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:oracleproduct10.2.0db_1NETWORKADMIN nsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)