使用的是data studio,所以末尾不加分號
create database link link_to_143 connect to scott identified by "tiger.1" using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.143)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bylw) ) )'
xxx.xxx.xxx.143是要連接的數據庫ip
我的密碼中有. 屬於特殊字符,必須加""才能通過。
scott是143數據庫的用戶名,密碼是tiger.1
bylw是xxx.xxx.xxx.143的SID
用法:
首選備份表:create table t_wfd_process_info20170918 as select * from t_wfd_process_info
然后刪除舊表:delete from t_wfd_process_info
之后將xxx.xxx.xxx.xxx表中的數據塞入本數據庫的表中:insert into t_wfd_process_info select * from t_wfd_process_info@link_to_143