当基表位于不同的数据库中时,在视图而非基表上授予选择

编程入门 行业动态 更新时间:2024-10-21 09:40:51
本文介绍了当基表位于不同的数据库中时,在视图而非基表上授予选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个视图,它从不同数据库的表中选择行.我想授予对视图的选择访问权限,但不授予对基表的直接访问权限.该视图有一个限制行数的 where 子句.

I have a view which is selecting rows from a table in a different database. I'd like to grant select access to the view, but not direct access to the base table. The view has a where clause restricting the number of rows.

我可以将选择授予视图而不是基表,还是需要切换到存储过程?我宁愿不这样做.

Can I grant select to the view and not the base table, or do I need to switch to a stored procedure? I would rather not do it the latter way.

推荐答案

当您在评论中指出相关表位于不同的数据库中时,所有权链适用.我怀疑某处的链条中断了 - 检查该链接以获取完整详细信息.

As you state in one of your comments that the table in question is in a different database, then ownership chaining applies. I suspect there is a break in the chain somewhere - check that link for full details.

更多推荐

当基表位于不同的数据库中时,在视图而非基表上授予选择

本文发布于:2023-10-27 23:16:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1534819.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而非   视图   中时   表上   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!