db link中的 dblink_authentication

bjwang112006 2011-06-12 10:50:12
db link中的 dblink_authentication
authenticated by .. identified by...是啥
莫非要两次密码?

...全文
73 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
秋雨飘落 2011-06-12
  • 打赏
  • 举报
回复
SHARED 创建一个共享的数据库连接,同时要指定database link_authentication。
使用shared方式的database link是数据库会限制到远程数据库的连接的数量,这样以避免过多的连接对远程数据库造成太大的压力。在使用shared database link的时候,到database link的连接会在连接以后与本地连接断开,为防止未授权的session使用此链接而要求在创建shared database link的时候必须要指定database link_authentication。
(from Oracle document: A shared database link is a link between a local server process and the remote database. The link is shared because multiple client processes can use the same link simultaneously.)

秋雨飘落 2011-06-12
  • 打赏
  • 举报
回复
CREATE [ SHARED ] [ PUBLIC ] DATABASE LINK dblink
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]
[ CONNECT TO
{ CURRENT_USER
| user IDENTIFIED BY password [ dblink_authentication ]
}
| dblink_authentication
]...
[ USING connect_string ] ;



AUTHENTICATED BY user
IDENTIFIED BY password

对于AUTHENTICATED BY的方式,官方文档有这样的说明:

dblink_authentication

Specify the username and password on the target instance. This clause authenticates the user to the remote server and is required for security. The specified username and password must be a valid username and password on the remote instance. The username and password are used only for authentication. No other operations are performed on behalf of this user.

You must specify this clause when you specify the SHARED clause. You cannot specify this clause unless you specify the SHARED clause.

可见加authenticated by的方式是shared database link的专利,共享服务器模式现在用的不是很多。

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧