如何使您的服务器成为选定视图的链接服务器? [英] How to make your Server as Linked Server for selected views?

查看:103
本文介绍了如何使您的服务器成为选定视图的链接服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个SQL Server 2012实例,它是我们安全系统的数据库.现在,我们有一个场景,我们希望允许SQL Server的另一个团队选择某些记录,即我们根据它们的需求为其创建了四个视图.

We have a SQL Server 2012 instance which is the database for our security system. Now we have a scenario where we want to allow another team our SQL Server to select certain records, ie we created four views for them for their requirements.

但是,我们不想向其提供或列出所有表,而只允许在我们的系统中查看和查询这四个视图.当我浏览许多文档时,很明显,我们可以通过将SQL Server做成链接服务器来做到这一点.

But, we don't want to provide or list all our tables to them but only allow these four views to see and query in our system. As I go through many documents it's clear that we can do it through making our SQL Server as a linked server.

通过链接服务器完成此操作的最佳方法是什么?

What's the best way to do it through a linked server?

推荐答案

我们不想向他们提供或列出所有表,而只是 允许这四个视图在我们的系统中查看和查询.

we don't want to provide or list all our tables to them but only allow these four views to see and query in our system.

您不需要链接服务器即可完成此操作.

You don't need linked server to accomplish this.

您需要做的就是对这4个视图授予SELECT权限.

All you need is to grant SELECT permission on these 4 views.

当您在数据库中创建用户并且不授予任何权限时,它根本看不到任何用户表/视图.而且,它将只能查看和查询您将授予其权限的那些对象

When you create a user in a database and don't grant any permission to it, it does not see any user table/view at all. And it will be able to see and query only those objects on which you'll grant the permissions

这篇关于如何使您的服务器成为选定视图的链接服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆