其他分享
首页 > 其他分享> > 通过dblink跨库访问

通过dblink跨库访问

作者:互联网

create public database link linkQzqd connect to qzqd identified by "qzqd" using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =XX.XX.XX.XX)(PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)) )';

create public database link linkSmz connect to smz identified by "smz" using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =XX.XX.XX.XX)(PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orclswbb)) )';

create public database link linkBbapprflow connect to bbapprflow identified by "bbapprflow" using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =3.127.41.26)(PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orclswbb)) )';

create public database link linkSjzt connect to sjzt identified by "sjzt" using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =XX.XX.XX.XX)(PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orclswbb)) )';

查询已经创建的dblink

select * from ALL_DB_LINKS;

删除已创建的dblink
drop public database link linkQzqd;
drop public database link linkSjzt;
drop public database link linkBbapprflow;
drop public database link linkSmz;

标签:SERVICE,database,跨库,dblink,访问,XX,link,connect,public
来源: https://www.cnblogs.com/qxqbk/p/16091179.html