我有一个视图,它从不同数据库的表中选择行.我想授予对视图的选择访问权限,但不授予对基表的直接访问权限.该视图有一个限制行数的 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.
更多推荐
当基表位于不同的数据库中时,在视图而非基表上授予选择
发布评论