数据库连接link

oracle数据库之间进行连接通讯。
创建语法:
create   database   link   linkname
connect   to   user
identified   by   usrpwd  
using   'demona ';

其中:demona为用net8   easy   config创建的连接字符串(实例名)
目的方数据库的init.ora文件中的global_names设为false
重新启动数据库设置才能生效
或者用sys用户执行

drop database link ttowb;
create database link ttowb connect to "tt" identified by "bitservice"  using 'datasource';

exp:
create database link tt64 connect to "tt" identified by "bitservice"  using 'ttpass64';

select * from tt.allactive@tt64 where rownum<3;

--在mda服务器上执行:建立到业务服务器的数据库链接;
connect ttowb/bitservice;
drop database link ttowb;
create database link ttowb connect to "TT" identified by "bitservice"  using 'datasource';
drop database link pubrowb;
create database link pubrowb connect to "PUBR" identified by "bitservice"  using 'datasource';
drop database link apowb;
create database link apowb connect to "AP" identified by "bitservice"  using 'datasource';
drop database link archiveowb;
create database link "archiveowb" connect to "ARCHIVE" identified by "bitservice"  using 'datasource';

原文地址:https://www.cnblogs.com/BradMiller/p/1752872.html