oracle的dblink

------创建dblink    其中dcs_orcl_link为dblink的名字 
------orcl 是密码
-----ORCL 是连接字符串的别名 也可以直接用tns后面的那一串
create database link dcs_orcl_link
connect to SYS identified by "pass"
using "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xx.xx.xxx)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = xxxx)))";




----查询库中的dblink
select * from dba_objects t where t.OBJECT_TYPE='DATABASE LINK'

----使用dblink  用@符号

select * from dual@dcs_orcl_link;

 

 

你可能感兴趣的:(dblink创建,dblink使用)