How to make your Server as Linked Server for selected views?

天大地大妈咪最大 提交于 2019-12-11 15:16:52

问题


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.

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?


回答1:


Are the views in a specific schema? Try to grant the users access to that schema, so that they can only read and see meta from it.

https://docs.microsoft.com/en-us/sql/relational-databases/security/metadata-visibility-configuration




回答2:


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.

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



来源:https://stackoverflow.com/questions/46515705/how-to-make-your-server-as-linked-server-for-selected-views

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!