drop database link dblinkname;
-- Create database link
create database link dblinkname
connect to username IDENTIFIED BY password
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = port))
)
(CONNECT_DATA =
(SERVICE_NAME = xxx)
)
)';
username是用户名 password是密码