create public database link DBLINK_WZGTAMS CONNECT TO WZGTAMS identified by WZGTAMS using ' (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.112)(PORT = 1521)) ) (CONNECT_DATA = (SID = orcl11g) (SERVER = DEDICATED) ) )';
接下来建立一个简单的查询验证效果
select * from 用户名下的.表@建立的远程连接名字
连接成功,
其中using里面的内容是ora文件的内容但是要去掉开始的实例名
CONNECT TO 远程用户名identified by 远程用户密码