码迷,mamicode.com
首页 > 数据库 > 详细

Oracle中dblink的创建与删除

时间:2017-07-18 15:33:30      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:service   test   toc   tab   port   sel   highlight   tcp   lin   

查询数据库中有哪些dblink连接

select * from dba_objects where object_type=‘DATABASE LINK‘;

 删除公有的EMIS_PRODUCTOIN连接

drop public database link EMIS_PRODUCTION;

 创建公有的EMIS_PRODUCTION连接

create public database link EMIS_PRODUCTION connect to EMIS_FRAME identified by EMIS_FRAME using ‘(DESCRIPTION =
(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = testdb))
)‘;

 删除EMIS_PRODUCTION连接

drop database link EMIS_PRODUCTION;

 创建EMIS_PRODUCTION连接

create database link EMIS_PRODUCTION connect to EMIS_FRAME identified by EMIS_FRAME using ‘(DESCRIPTION =
(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = testdb))
)‘;

测试是否可用

select * from EMIS_FRAME.sys_menu@EMIS_PRODUCTION;

 

Oracle中dblink的创建与删除

标签:service   test   toc   tab   port   sel   highlight   tcp   lin   

原文地址:http://www.cnblogs.com/xvpindex/p/7200105.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!