创建连接:
create database link PMSUATTMP
connect to spmsadmin identified by "spmsadmin"
using '(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=10.63.29.36)(PORT=1531))
(CONNECT_DATA=(SERVICE_NAME=pms))
)';
复制数据:
insert into sms_solution_lex_2020
(id, loginname, article)
select * from spmsadmin.sms_solution_lex_2020@PMSUATTMP;
insert into sms_solution_tuofu_2020
(id, projectnumber, create_by, projectname, representativeoffice, representativeofficetype, industry, solutiontype, product, sumtime, status)
select * from spmsadmin.sms_solution_tuofu_2020@PMSUATTMP;
commit;
删除链接:
DROP DATABASE LINK PMSUATTMP;