Oracle创建dblink

---------------------
create database link aml_cust
connect to aml_basic identified by aml_basic
using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.200.110)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = orcl)))';
aml_cust : 表示dblink名字

aml_basic :表示 远程数据库的用户

aml_basic: 表示远程数据库的密码

HOST = 192.168.200.110 : 表示远程数据库IP

PORT = 1521 : 表示远程数据库端口

SERVICE_NAME = orcl : 远程数据库的实例名

查询语句:
select * from TD00_CUST@aml_cust;

--删除DBLINK
DROP DATABASE LINK aml_cust;  
--或  
DROP PUBLIC DATABASE LINK aml_cust;  

查询DBLINK信息
select * from dba_db_links;
select owner,object_name from dba_objects where object_type='DATABASE LINK';
select * from ALL_DB_LINKS;


--查询出BLOB字段的值,放入到别的表中
insert into ACT_GE_BYTEARRAY select * from ACT_GE_BYTEARRAY@aml_flow_list ;

posted on 2019-07-17 16:19  794536524  阅读(477)  评论(0编辑  收藏  举报