在工作中遇到的情况简单说下:
--首先要赋予用户创建dblink的权限。
grant resource to ods_nwsc;
grant create database link to ods_nwsc;
--在赋予权限的用户下面创建dblink的代码。
CREATE database link link_nwsc
CONNECT TO lcam_sc IDENTIFIED BY lcam_SC_201504
USING ‘(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.81.125)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = scxtdb)
)
)‘;
参考地址:http://www.cnblogs.com/sumsen/archive/2013/03/04/2943471.html
时间: 2024-10-08 19:35:02