create database link tobsms connect to bjlt identified by bjlt using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.121)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME =orcl) ) )'; select * from users@tobsms
有两个服务器,每个服务器上都有一个oracle数据库,两个数据库之间可以共享表,在一台oracle中输入上述代码即可。
select查询语句是下面这句。