oracle创建和使用链路

create database link ylcp3
connect to ylcp3 identified by ylcp3
using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.6.222)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ylcp3)
)
)';
select * from ylcp3.ica1@ylcp3;

创建时连接的用户必须是要连接的数据库的用户名和密码
使用时【用户名】.【表名】@【链路名】
create synonym table1 for user1.table1;

你可能感兴趣的:(oracle)