Oracle创建dblink进行跨数据库操作
创建dblink:create public database link link_to_test connect to 用户名
IDENTIFIED by "密码大写"
using
'(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 跨库ip地址)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = 数据库服务名)))'
创建同义词:create synonym 同义词名字 FOR 数据库名字@link_to_test;
使用同义词:select count(*) from 同义词名字; 可以达到查其他库的效果