日期:2014-05-16 浏览次数:20498 次
在此文件下 G:/oracle_test/product/10.2.0/db_1/NETWORK/ADMIN/tnsnames.ora 添加: link = (DESCRIPTION= (ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = 数据库IP)(PORT = 1521)))(FAILOVER=yes)(LOAD_BALANCE=yes) (CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME = 数据库SID)(failover_mode=(type=select)(method=basic)) ) ) 查看当前用户有哪些权限 select * from user_sys_privs; 使用DBA登陆 创建DBLINK的权限:create database link to sampledata; 删除DBLINK的权限:drop database link from sampledata; 用户操作存储过程权限: grant execute any procedure to sampledata; grant alter any procedure to sampledata; grant create any procedure to sampledata; grant drop any procedure to sampledata; 使用sampledata用户登陆创建DBLINK,不能sysdba SQL> create database link 连接名称 connect to 远程数据库用户名 identified by 密码 using 'link'; --查看DBLINK的归属用户是否当前用户,否则可能无法连接远程数据库 select * from dba_db_links; 测试: select * from user_login@连接名称;
?本文引用:http://blog.csdn.net/joe4011/article/details/5889801