dblink

如何创建dblink:

 

create  database link BillLink connect to bill identified by bill

   using '(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME =orcl)

)

)'; 

 

1、create database link BillLink 中的BillLink 为我们建立dblink的名字,根据需要自定  

2、connect to bill identified by "bill"用账号bill/zbill访问我们的dblink数据库,该数据库被using字句描述  

3

using '(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME =orcl)

)

)'; 

描述我们要dblink到数据库,该信息形式可以再oracle的配置文件tnsnames.ora中获取

4.删除dblink

 

  1. drop database link BillLink   

你可能感兴趣的:(DBlink)