Oracle DB Link记录

2014-11-24 11:56:42 · 作者: · 浏览: 0

方法一:通过代码书写oracle db link;
create public database link test_link2
connect to twc identified by twc using
'(description =
(address_list=
(address = (protocol = TCP)(HOST=192.168.0.129)(PORT = 1521))
)(connect_data =
(service_name = LHW)
))';
select * from twc.sfzinfo@test_link2;
备注:其中test_link2为dblink名称,twc /twc 为oracle
数据库-www.2cto.com-用户名和密码,HOST为远程数据库的IP地址,PORT为数据库的端口号,service_name 为Datebase服务器名称;
方法二:通过PL/SQL写,之前已写过,就不再描述;
作者 tanwencan