database link for Oracle: Users of Database Links

Posted on 2009-09-05 10:42 bruce.peng 阅读(313) 评论(0)  编辑  收藏 所属分类: DB
When creating the link, you determine which user should connect to the remote database to access the data.
The following table explains the differences among the categories of users involved in database links:
当创建link时,你必须是哪个user连接 remote database 访问数据
下表解释了不同user 如何调用database link:
 User Type

usre 类型
Sample Link Creation Syntax

创建link的语法
 Connected user  ---connetcted user 不是创建link的user,只是可以访问这个link的user
一个本地user可以通过指定username和pwd访问database link,那么他就是connected user。
system 通过public link 查询,这时connected user是system,并且remote数据库会连接到system schema
 CREATE PUBLIC DATABASE LINK hq USING 'hq';
 Current user  --global user必须有 X.509 认证(一个SSL-authenticated enterprise user)并且这个user 必须可以调用这个database link。current user 是oracle security的一个方面。

详情可以参见 oracle database advanced security. administrator 手册中的global security 相关信息
 CREATE PUBLIC DATABASE LINK hq CONNECT TO CURRENT_USER using 'hq';
 Fixed user  --当定义创建定义一个database link 时,Fixed user 的username/password 会出现在定义语句中。
当一个link中包含了fixed user的用户名和密码,那么这个用户名和密码将用于连接remote database.
 CREATE PUBLIC DATABASE LINK hq CONNECT TO jane IDENTIFIED BY doe USING 'hq';


只有注册用户登录后才能发表评论。


网站导航: