创建dblink
-- 查询是否有dblink权限 select * from user_sys_privs where privilege like upper('%DATABASE LINK%'); -- 没有赋权 grant CREATE PUBLIC DATABASE LINK,DROP PUBLIC DATABASE LINK to gzidc; -- 创建连接 CREATE public database link SHICHOU_DBLINK CONNECT TO '用户名' IDENTIFIED BY '密码' USING'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 端口号)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) )';