2、授权
grant CREATE DATABASE LINK to scott, perfstat, hr;
grant create public database link to scott;
3、权限说明
public database link,大家都可以访问和使用
private database link,仅供拥有者使用,即使sys用户也无法调用
4、查询dblink
select * from dba_db_links;
grant CREATE DATABASE LINK to scott, perfstat, hr;
grant create public database link to scott;
3、权限说明
public database link,大家都可以访问和使用
private database link,仅供拥有者使用,即使sys用户也无法调用
4、查询dblink
select * from dba_db_links;
create public database Link dblk_108_96_dsdb
connect To scott identified by "tiger"
using '
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME =orcl)
)
)';
connect To scott identified by "tiger"
using '
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME =orcl)
)
)';
grant CREATE DATABASE LINK to scott, perfstat, hr;
create public database Link dblk_108_96_dsdb
connect To scott identified by "tiger"
using '
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 183.37.238.43)(PORT = 6521))
)
(CONNECT_DATA =
(SERVICE_NAME =dsedu)
)
connect To scott identified by "tiger"
using '
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 183.37.238.43)(PORT = 6521))
)
(CONNECT_DATA =
(SERVICE_NAME =dsedu)
)
dblink:用来访问远端的数据库实例的数据,建议不要通过dblink操作远程实例上的数据(例如修改,删除)