oracle 如何与另一个模式共享数据库链接?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17184701/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to share DB link with another schema?
提问by zephyrus
I have access to two schema. Only one of them has previleges to create a DB link. I want the other schema also to use this DB link. Also I do not have intentions of creating a public DB link. Is this possible in Oracle SQL?
我可以访问两个模式。只有其中一个拥有创建数据库链接的权限。我希望其他架构也使用此数据库链接。我也无意创建公共数据库链接。这在 Oracle SQL 中可能吗?
回答by Justin Cave
No, it is not possible. A database link is either public or private. If it is private, you cannot grant another schema access to the database link.
不,这是不可能的。数据库链接要么是公共的,要么是私有的。如果它是私有的,则不能授予对数据库链接的其他架构访问权限。
It is likely, however, that you can solve whatever business problem you have without needing to grant user2
access to the database link owned by user1
. Commonly, for example, you would create a view in the user1
schema that queries a table over the database link and then grant user2
access to that view.
但是,很可能您可以解决您遇到的任何业务问题,而无需授予user2
对user1
. 例如,通常,您会在user1
架构中创建一个视图,通过数据库链接查询表,然后授予user2
对该视图的访问权限。