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

oracle dblink 创建使用 垮库转移数据

时间:2015-09-17 13:15:48      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

create  database link JTKHJFDB
connect to khjf identified by hello
using (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.196.57.197)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = JTKHJFDB)
    )
  )
;
select  party_id,realname from tbl_person ;
select * from  t_customer@JTKHJFDB ;
delete from t_customer@JTKHJFDB  
create synonym remote_seq for PK_SEQ@JTKHJFDB;
insert into t_customer@JTKHJFDB(ID, uuid,name) select remote_seq.nextval, to_char(party_id),realname from tbl_person;
Drop   DATABASE LINK JTKHJFDB;

 

oracle dblink 创建使用 垮库转移数据

标签:

原文地址:http://www.cnblogs.com/linbl/p/4815802.html

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