oracle创建dblink

--删除dblink
drop database link agent_link ;
--创建dblink
create database link agent_link connect to tas identified by tas
using '(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test100)
    )
 )';
--删除代理商标/代理商等级表同义词
drop synonym ocs_dealer_level_info;
drop synonym ocs_dealer_info;
--新建代理商标/代理商等级表同义词
CREATE SYNONYM ocs_dealer_level_info FOR ocs_dealer_level_info@agent_link;
CREATE SYNONYM ocs_dealer_info FOR ocs_dealer_info@agent_link;

你可能感兴趣的:(oracle,创建,DBlink)