需求: 需要从A库取数据,写入到B库。 在B库中新建dblink 连接到 A库。则可以用 insert into B 库 select * from A库。
create database link db_link_zshj
connect to 用户名 identified by 密码
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 191.100.128.xx)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = GGYW)
)
)';