类型 | Owner | 描述 |
Private | 创建database link的user拥有该database link | 在本地数据库的特定的schema下建立的database link。只有建立该database link的schema的session能使用这个database link来访问远程的数据库。同时也只有Owner能删除它自己的private database link。 |
Public | Owner是PUBLIC. | Public的database link是数据库级的,本地数据库中所有的拥有数据库访问权限的用户或pl/sql程序都能使用此database link来访问相应的远程数据库。 |
Global | Owner是PUBLIC. | Global的database link是网络级的,When an Oracle network uses a directory server, the directory server automatically create and manages global database links (as net service names) for every Oracle Database in the network. Users and PL/SQL subprograms in any database can use a global link to access objects in the corresponding remote database. Note: In earlier releases of Oracle Database, a global database link referred to a database link that was registered with an Oracle Names server. The use of an Oracle Names server has been deprecated. In this document, global database links refer to the use of net service names from the directory server. |
Privilege | Database | Required For |
CREATE DATABASE LINK | Local | Creation of a private database link. |
CREATE PUBLIC DATABASE LINK | Local | Creation of a public database link. 巨人的花园教学实录 |
CREATE SESSION | Remote | Creation of any type of database link. |
取值希罗达 | 说明 |
不指定 | 默认值建立一个dedicated的连接,每一个使用database link的本地session都会对应有一个远程数据库的session。 |
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.) |
取值 | 说明 |
不指定 | 默认值建立一个private的database link |
PUBLIC惜春小札 | 公共连接,这样的连接可以被数据的所有的用户访问 |
取值 | 说明 |
不指定 | 默认值采取Connected User的验证方法 |
CONNECT TO CURRENT_USER | 采取CURRENT_USER的验证方式 |
CONNECT TO user_name IDENTIFIED BY password | 采取Fiexed User的验证方式 |
SQL Statement | Connects To Database | Connects As | Link Type |
CREATE database link sales.us.americas.acme_auto USING ‘sales_us’; | sales using net service name sales_us | Connected user | Private connected user |
CREATE database link foo CONNECT TO CURRENT_USER USING ‘am_sls’; | sales using service name am_sls | Current global user | Private current user |
CREATE database link sales.us.americas.acme_auto CONNECT TO scott IDENTIFIED BY tiger USING ‘sales_us’; | sales using net service name sales_us | scott using password tiger | Private fixed user |
CREATE PUBLIC database link sales CONNECT TO scott IDENTIFIED BY tiger USING ‘rev’; | sales using net service name rev | scott using password tiger | Public fixed user |
CREATE SHARED PUBLIC database link sales.us.americas.acme_auto CONNECT TO scott IDENTIFIED BY tiger AUTHENTICATED BY anupam IDENTIFIED BY bhide USING ‘sales’; | sales using net service name sales | scott using password tiger, authenticated as anupam using password bhide | Shared public fixed user |
本文发布于:2023-06-27 15:35:29,感谢您对本站的认可!
本文链接:https://patent.en369.cn/xueshu/137406.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |