CREATE PUBLIC DATABASE LINK db_link_name CONNECT TO username IDENTIFIED BY password USING ‘(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =visist_IP)(PORT =visit_port ))
)
(CONNECT_DATA =
(SERVICE_NAME = SID)
)
)’;
–参数说明
–username 需要访问数据用户名, password 密码, visit_ip 需要访问数据库的ip,visit_port 窗口, SID数据库名称
查询方式:select * from 表名@db_link_name