1:创建DBLINK(USING后面的连接字符串就是要访问的那个数据库的连接字符串)
CREATE DATABASE LINK linkName
CONNECT TO userName IDENTIFIED BY passwork
USING
'(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 19.22.40.7)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DJPG)
)
)';
2:访问表
SELECT * FROM FEESITEMS@linkName;