1、给用户创建dblink权限:
grant create public database link to xx;
2、创建 db_link
create database link link_xx
connect to orcl
identified by xx
using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = orcl)))';
3、查看db_links
select * from dba_db_links